ComponentOne List 8.0 for ActiveX
Assigning a value to a style property

You can also customize the appearance of a list component by directly assigning a named style to an appropriate style property. For example, suppose that you have defined a style named Verdana as depicted in the following illustration.

To render a list caption using this font and color scheme, you can set the CaptionStyle property directly instead of setting individual font and color properties. At design time, this is done by selecting the CaptionStyle tree node on the General property page and selecting Verdana from the list of named styles to the right of the property tree. The change is committed to the list when you click the OK or Apply button or select a different property page tab.

Note that the text of the CaptionStyle node now ends with the word Verdana enclosed in square brackets. You can achieve the same result in code by writing:

Example Title
Copy Code
TDBList1.CaptionStyle = "Verdana"

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback