isDynamic specifies whether label text or image can be changed at runtime using the DISPLAY ... TO statement.
in Lycia Form Designer |
Form XML code:
<Label isDynamic="true" identifier="lb1"/>
Possible values: true, false
Default value: true
Associated containers, widgets and theme elements: Label
Associated ui methods:
setIsDynamic ↓
getIsDynamic ↓
Influence and behavior:
By default, labels are dynamic which means that you can change their text and image at runtime.
When the isDynamic property is set to true, DISPLAY ... TO will change the text and/or image at runtime. Otherwise, DISPLAY ... TO will have no runtime effect.
lycia form designer |
With Label One (identifier=lb1), isDynamic=true:
|
With Label Two (identifier=lb2), isDynamic=false:
|
initial runtime appearance |
|
|
changed runtime appearance - 1st display |
|
|
changed runtime appearance - 2nd display |
|
At runtime, you can find out whether the label is dynamic or static and change it by means of ui methods:
DEFINE lb ui.Label
...
LET lb = ui.Label.ForName("lb1")
4gl code sample |
CALL lb.setIsDynamic(0) DISPLAY lb.getIsDynamic() DISPLAY "not dynamic" TO lb1
|
CALL lb.setIsDynamic(1) DISPLAY lb.getIsDynamic() DISPLAY "dynamic" TO lb1
|
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: user_interface/form_properties
Program: isdynamic
isdynamic_ui
Related articles: