text specifies the text associated with a widget. Depending on a widget ↓ , it can be a widget's label text, its default value, or a path to any content to be displayed.
in Lycia Form Designer |
Associated containers and widgets:
|
Form XML code: depends on a widget
<Button text="Button" identifier="bt"/>
or
<Browser text="www.querix.com" identifier="br"/>
Possible values: depend on the user's needs
Default value: depends on a widget
Browser |
www.querix.com |
|
Button |
Button N |
N is the number of the button in the order of their addition to the form |
Calendar |
<no text> |
|
FunctionField |
<no text> |
|
ComboBox |
<no text> |
|
ComboBoxItem |
valueN |
N is the number of the item in the order of their addition to the form |
Label |
New Label |
by default, every new label will hold the same text regardless of how many labels there are in the form |
ListBoxItem |
valueN |
N is the number of the item in the order of their addition to the form |
MenuGroup |
Menu group |
by default, every new menu group will hold the same text regardless of how many menu groups there are in the form |
MenuCommand |
Menu command |
by default, every new menu command will hold the same text regardless of how many menu commands there are in the form |
TextArea |
<no text> |
|
TextField |
<no text> |
|
ToolbarButton |
tbButtonN |
N is the number of the toolbar button in the order of their addition to the form |
TimeEditField |
<no text> |
|
Associated 4gl syntax:
Associated ui methods:
Influence and behavior:
The table below describes what information the text property specifies for each associated widget.
Button
Label
ComboBoxItem
ListBoxItem
MenuGroup
MenuCommand
ToolbarButton |
specifies the widget's label text:
|
|
|
|
|
|
|
|
Calendar
FunctionField
TimeEditField
ComboBox |
specifies the text to be displayed in the widget's field:
|
|
|
|
|
|
|
|
TextArea
TextField |
specifies the default text to be displayed at runtime:
|
|
|
|
|
If the property is not set, the widget will hold no text:
|
||
|
|
|
Browser |
specifies the browser content; holds either a URL address of a web-page or a path to a file to be displayed:
|
|
|
|
|
The browser's ability to display a definite file depends on whether your have the necessary plug-in installed on your computer to open this file.
|
To change the text of a widget in the form,
→ double-click the widget and type the new text directly into it:
→ change the value of the property in the Properties view:
To change the text of a widget at runtime,
→ apply SetText method to the corresponding ui element:
LET widget_var = ui.<widget>.ForName("widget_id1")
CALL widget_var.setText("your text")
4gl code sample |
DEFINE br ui.Browser ... LET br = ui.Browser.ForName("br1") CALL br.setText("www.bloomberg.com")
|
DEFINE bt ui.Button ... LET bt = ui.Button.ForName("bt1") CALL bt.setText("ui.SetText")
|
DEFINE tf ui.TextField ... LET tf = ui.TextFiled.ForName("tf1") CALL tf.setText("ui.SetText")
|
initial runtime appearance |
|
|
|
changed runtime appearance |
|
|
|
→ display the necessary text to a widget using DISPLAY ... TO:
DISPLAY "your text" TO widget_id
4gl code sample |
DISPLAY "qx://application/wc01" TO br1
|
DISPLAY "DISPLAY...TO" TO bt1
|
DISPLAY "DISPLAY...TO" TO tf1
|
initial runtime appearance |
|
|
|
changed runtime appearance |
|
|
|
The examples above were taken from the example programs.
Example programs:
CVS server: client.querix.com
CVS repository: /lycia_doc_examples
User: client
Project: form_properties
Program: text_browser
text_button
text_calendar
text_combobox
text_label
text_textfield