RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseInetXPageProducer.Styles Property

Defines the styles that can be used by the page producer and its Web items.

Pascal
property Styles: TStrings;
C++
__property TStrings Styles;

Use Styles to define a style sheet for the HTML document produced by TBaseInetXPageProducer. Each string in the TStrings object specifies a specific style by giving a style selector followed by a set of attributes in curly braces. These definitions can define styles for standard HTML elements such as

H2 B  {color: red}

or they can define styles that you name, such as

.MyStyle  {font-family: arial; font-weight: bold; font-size: 18px }

Note that user-defined style names must begin with a dot.  

Styles for standard elements are applied automatically to HTML that uses the tag or tags that form the style selector. User-defined styles can be applied by setting the StyleRule property of a Web item to the user-defined style name that forms the selector.

Note: If you are sharing a set of styles between multiple page producers or multiple applications, you can define the styles in a file. To define the styles in a file, use the StylesFile property instead. If StylesFile is defined, it takes precedence over the Styles property.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!