Style Property
Specifies certain styles for a control. Read/write at design and run time.
[Form.]Control.Style[= nType]
Property Values
nType
For ComboBox controls, the following table lists the settings for the Style.nType Description 0 Drop-down combo box, including a list and an edit box. The user can select from the list or type characters in the edit box.
2 Drop-down list. The user must select from the list.
Follow these guidelines in deciding which setting to choose:
- Set Style to 0 (drop-down combo box) to provide a list of choices and allow the user to type a selection in the edit box. Style 0 saves space on a form because the list closes when the user makes a selection.
- Set Style to 2 (drop-down list) to display a fixed list of choices that the user can select an item from. The list closes when the user selects an item.
For CheckBox and OptionButton controls, the following table lists the settings for the Style property.
nType Description 0 Standard 1 Graphical. The button appears like a command button and can contain both graphics and text. When the button contains both, the position of the text and graphic is determined by the PicturePosition property.
For CommandButton controls, the following table lists the settings for the Style property.
nType Description 0 Standard 1 Invisible For TextBox controls, the following table lists the settings for the Style property.
nType Description 0 Normal (Default) 1 Included for backward compatibility with the FoxPro version 2.x @ ... SAY command. The text box is read-only and cannot receive focus. For Toolbar separator objects, the following table lists the settings for the Style property.
nType Description 0 Normal (Default). No vertical line rule.
1 Specifies a vertical line as the separator object in toolbars and is visible at run time only. For Label and Shape controls, and Container and Control objects, the following table lists the settings for the Style property.
nType Description 0 Normal (Default) 3 Themed Setting nType to 3 produces the following effects:
- On a Label control, Style controls the color of the text. If Themes is enabled for a label, Visual FoxPro disregards the Enabled and FontCharSet properties.
- On a Shape control, Container or Control object, Style controls the color and style of the border. If Themes is turned on for a Shape control, Visual FoxPro disregards the Curvature property.
If an operating system does not support Windows XP Themes, or if Themes is turned off, Visual FoxPro uses the settings for other properties such as SpecialEffect.
See Also
Click Event | DblClick Event | Curvature Property | SpecialEffect Property | Enabled Property | FontCharSet Property
Applies To: CheckBox Control | ComboBox Control | CommandButton Control | OptionButton Control | Separator Object | TextBox Control | ToolBar Object | Label Control | Shape Control | Container Object | Control Object