Using the Intraweb (Ten)-CSS

Source: Internet
Author: User


IW will convert most of the visual attributes to CSS; Our active use of CSS takes two steps:
The first step:
{The CSS file to be linked is specified via the form's StyleSheet property}  procedure tiwform1.iwappformcreate (sender:tobject);  begin Stylesheet.filename: = ' mycss1.css ';    CSS file must be placed under  wwwroot//Stylesheet.url: = '// Outer chain  end; {If the site-level CSS ... Tiwservercontroller.oncreate}procedure tiwservercontroller.iwservercontrollerbasecreate ( Sender:tobject);  begin Stylesheet.filename: = ' mycss1.css ';    CSS file must be placed under  wwwroot//Stylesheet.url: = '// Outer chain  end;

Step Two:
{Specify CSS properties for the control you want to use for the style}procedureTiwform1.iwappformcreate (Sender:tobject);beginStylesheet.filename: = ' mycss1.css '; Iwmemo1.css: = ' Class1 '; If there is a Class1 class in mycss1.css, such as:. Class {font-size:32px;}IWMemo1.StyleRenderOptions.RenderFont: = False; Under normal circumstances, you also need to adjust the Stylerenderoptions propertyEnd; {------------------------------------------------------------------about Stylerenderoptions property: If we use CSS for the control, It is possible to conflict with the properties of the control itself, which one? This requires the Stylerenderoptions property of the control to decide! It is also a class (Iwtypes.tiwstylerenderoptions < Tpersistent < TObject), which has only a few Boolean properties: Property Rendersize:boolean//property Renderposition:boolean//property renderfont:boolean//property Re Nderzindex:boolean//property rendervisibility:boolean//property renderstatus:boolean//Enabledproperty Render Padding:boolean//property renderborder:boolean//property renderabsolute:boolean//property usedisplay:boole AN//when the corresponding value is False, the corresponding CSS can be used.-------------------------------------------------------------------}

Many of the actions of CSS are similar to JavaScript, such as:
 
  procedure  tiwform1.iwappformcreate (sender:tobject);  Begin    iwservercontroller.htmlheaders (' <link type= "text/css" rel= "stylesheet" href= "Mycss1.css"/> "  );  Self.PreHeader.Add (' <link type= ' text/css "rel=" stylesheet "href=" mycss2.css "/> '  );   SELF.EXTRAHEADER.ADD (' <link type= ' text/css "rel=" stylesheet "href=" mycss3.css "/> '  );  IWSERVERCONTROLLER.CONTENTFILES.ADD (' mycss4.css '  );  Self.ContentFiles.Add (' mycss5.css '  );  end ; 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.