toCase specifies the case of a text input to widgets.
Form XML code:
Theme property filter XML code:
<DoStyleAction>
<SetProperty>
<PropertyPath>
<PropertyName>ToCase</PropertyName>
</PropertyPath>
</SetProperty>
</DoStyleAction>
Possible values:
none
up
down
Default value: none
Inheritance diagram:
Associated containers, widgets and theme elements:
Associated 4gl syntax:
Associated ui methods:
SetToCase ↓
GetToCase ↓
Influence and behavior:
None |
|
Case does not change, i.e., letters remain the same as they were inputted. |
Up |
|
All the letters are changed to upper case regardless of their original one. |
Down |
|
All the letters are changed to lower case regardless of their original one. |
At runtime, the text case can be changed with ui methods:
LET widget_var = ui.<widget>.ForName("widget_id1")
CALL widget_var.setToCase("<>")
DISPLAY widget_var.getToCase()
4gl code sample:
MAIN
DEFINE f1,
f2, f3
STRING,
tf_1, tf_2,
tf_3 ui.TextField
OPEN WINDOW w
WITH FORM "toCase"
ATTRIBUTE(BORDER)
LET tf_1
= ui.TextField.ForName("f1")
LET tf_2
= ui.TextField.ForName("f2")
LET tf_3
= ui.TextField.ForName("f3")
MENU
COMMAND "input"
CALL tf_1.setToCase("Up")
CALL tf_2.setToCase("Down")
CALL tf_3.setToCase("None")
DISPLAY "With f1, toCase=", tf_1.getToCase()
DISPLAY "With f2, toCase=", tf_2.getToCase()
DISPLAY "With f3, toCase=", tf_3.getToCase()
INPUT BY NAME f1
WITHOUT DEFAULTS
INPUT BY NAME f2
WITHOUT DEFAULTS
INPUT BY NAME f3
WITHOUT DEFAULTS
COMMAND "exit"
EXIT MENU
END MENU
END MAIN
runtime appearance:
With ComboBox, toCase influences only those values that were entered by the user in the edit mode with editable = true:
toCase in ComboBoxes has no effect on the values selected from the list:
Try the example program, combobox_04_tocase, to see this feature in action.