Type: | Module | Parent Module: | N/A |
Module | Module_WindowStyles |
Version / Date | 2.2 - 7 May 2003 |
Author (Organisation) | Kevin Gale (Newcastle Computer Services Plc) |
keving@ncs-plc.co.uk |
This module converts the all window objects to use required default styles and sets the window's theme. The module can also perform the following tasks by setting the relevant flags in the module $construct method prior to running the converter:
Copy the default styles from styles library:
The styles defined in the O$Styles.lbs must be named exactly as below but the properties and platforms defined for the styles are at the discretion of the developer and can be changed following completion of the conversion process.
Field Type |
Style Used |
Min Height |
Capitalize Labels |
Notes |
kCheckbox |
CtrlCheckBox |
18 |
cCapitalizeObjects |
|
kCombo |
CtrlComboBox |
19 |
No |
Maximize drop down height if cMaximizeDropDownHeight = kTrue |
kComplexGrid |
CtrlEditText |
N/A |
No |
|
kDroplist |
CtrlDropdownList |
19 |
No |
Set $forecolor to kWhite and maximize drop down height if cMaximizeDropDownHeight = kTrue |
kEntry |
CtrlEditText |
19 |
No |
Only if object $effect <> kBorderNone or cNoBorderAsLabel = kFalse (i.e. no border entry fields are not to be treated as text labels) |
|
CtrlLabel |
13 |
cCapitalizeLabels |
Only if object $effect = kBorderNone and cNoBorderAsLabel = kTrue (i.e. no border entry fields are to be treated as text labels) |
kLabel |
CtrlLabel |
13 |
cCapitalizeLabels |
|
kListBox |
CtrlListBox |
N/A |
No |
If cConvertListToHeadedList = kFalse |
|
CtrlHeadedListBox |
N/A |
No |
If cConvertListToHeadedList = kTrue then the original list box is removed and replaced by a new headed list box |
kMaskedEntry |
CtrlEditText |
19 |
No |
|
kMultilineEntry |
CtrlEditText |
19 |
No |
|
kPictureobj |
CtrlPicture |
N/A |
No |
|
kPoplist |
CtrlPopupList |
19 |
No |
If cConvertPopupListToDropDownList = kFalse |
|
CtrlDropdownList |
19 |
No |
If cConvertPopupListToDropDownList = kTrue then the original popup list is removed and replaced by a new dropdown list box (also set $forecolor to kWhite) |
kPopmenu |
CtrlPopupMenu |
19 |
No |
|
kPushbutton |
CtrlPushButton |
23 |
cCapitalizeObjects |
|
kRadio |
CtrlRadioButton |
18 |
cCapitalizeObjects |
|
kText |
CtrlLabel |
13 |
cCapitalizeLabels |
|
The various styles defined in O$Styles.lbs only control the font name and font size. If you wish to control other properties of fields using styles then you will need to modify the #STYLES table setting the required properties for "All platforms", either in the O$Styles.lbs before running the O$Converter, or in your own library after running the converter.
NB. Where columns in the table above contain cCapitalizeObjects, cCapitalizeLabels, cNoBorderAsLabel, cConvertListToHeadedList or cConvertPopupListToDropDownList then these are switches that control this processing. The developer must set the values of these class variables by editing the code in the $constuct method of the module. If a variable is calculated as kTrue then the style changes controlled by that variable are switched on and if calculated to kFalse they are switched off.
Only window classes are processed. For each window class all field and background objects on the window are processed.
Process each field and background object on the window class (nb. in the following items in italics represent the switches you set in the $construct method of the module.) For each object:
Set the window class $backgroundtheme to kBGThemeWindow.