Visual Shadowing of TextBoxes and Labels
When a container is shadowed, that object and all of its descendants will display in the appropriate shadowed format. Form and edit areas will change to the gray disabled color, and buttons and groups will be shadowed. This is all automatic and is handled by shadow_display.
When a TextBox appears within a shadowed container or when a label’s entry object is shadowed, it is less clear how the TextBox should appear. The text can either be shadowed or it can be left unaltered. The default behavior is as follows:
-
When a TextBox is inherently shadowed or when a label’s entry object (like a dbForm) is inherently shadowed, the text display is not altered.
-
When a TextBox or a label is contextually shadowed by a container parent (like a group), the text display is shadowed.
The following examples should make this clear.
Object oMyGroup is a Group
Set Location to 10 10
Set Size to 100 200
Set Label to "My Group"
Object oMyForm is a Form
Set Location to 10 70
Set Size to 13 50
Set Label to "My Label" // form will be gray, label text will be normal
Set enabled_state to false
End_Object
Object oMyTextbox is a TextBox
Set Location to 10 140
Set Label to "Additional Label" // text will be normal
End_Object
End_Object
In this example, the label will not be shadowed, but the form will appear with the gray disabled color.
Object oMyGroup is a Group
Set Location to 10 10
Set Size to 100 200
Set Label to "My Group"
Set enabled_state to false
Object oMyForm is a Form
Set Location to 10 70
Set Size to 13 50
Set Label to "My Label" // form will be gray, label text will be shadowed.
Set enabled_state to false // doesn’t matter what this is
End_Object
Object oMyTextbox is a TextBox
Set Location to 10 140
Set Label to "Additional Label" // text will be shadowed.
End_Object
End_Object
In this example, the label will also appear shadowed because it is shadowed by its container. If the shadow_state was reset to false in the group object, the label would again appear normal but the form would remain gray (because it is still shadowed).
This behavior can be modified with the property Label_Shadow_Display Mode. This determines how text is shadowed in a textbox or label. The values for this property are:
-
TBSHADOW_ON_GROUP: Visually shadow text if the object is contextually shadowed (by ancestor). This is the default value.
-
TBSHADOW_ON_NONE: Never visually shadow the text.
-
TBSHADOW_ON_LOCAL: Visually shadow text if the object is inherently shadowed.
-
TBSHADOW_ON_ALL: Visually shadow text whenever the object is shadowed.
In the following example, the label will never display shadowed text.
Object oMyGroup is a Group
Set Location to 10 10
Set Size to 100 200
Set Label to "My Group"
Set enabled_state to false
Object oMyForm is a Form
Set Location to 10 70
Set Size to 13 50
Set Label_Shadow_Display_Mode to TBSHADOW_ON_NONE
Set Label to "My Label" // form will be gray, label text will be normal
End_Object
Object oMyTextbox is a TextBox
Set Location to 10 140
Set Label_Shadow_Display_Mode to TBSHADOW_ON_NONE
Set Label to "Additional Label" // text will be normal
End_Object
End_Object