visible

Visible is used to make objects visible/hidden at runtime.

Form XML code:

<Button text="Button"visible="true"identifier="bt1"/>

Theme XML code:

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>Visible</PropertyName>

    </PropertyPath>

  </SetProperty>

</DoStyleAction>

Possible values:

true, false

Default value:

true (in Lycia Form Designer)

not specified (in Lycia Theme Designer)

Associated containers, widgets and theme elements:

BorderPanel

CoordPanel

GridPanel

GroupBox

StackPanel

ScrollViewer

Tab

TabPage

Table

TreeTable

BlobViewer

Browser

Button

Calendar

Canvas

CheckBox

ComboBox

FunctionField

Label

ListBox

MenuBar

MenuGroup

MenuCommand

Separator

ProgressBar

RadioGroup

PlaceHolder

Spinner

TextArea

TextField

Toolbar

ToolbarButton

TimeEditField

WebComponent

Associated methods:

setVisible 

getVisible 

Influence and behavior:

With the visible property set to false, widgets and containers become invisible at runtime. However, if the widget hidden is surrounded by other widgets, users will see an empty space between them at runtime:

With all buttons, visible=true

 

With the button Two (identifier=bt2), visible=false:

With two other buttons (identifier=bt1, identifier=bt3), visible=true:

Though the visible property can be set both in the form and in the application theme, runtime visibility of the object will be governed by the latter (as the user theme definition prevails over the form definition).

When visible=false for a form element with child objects, they also become invisible regardless of whether the visible property set to them.

 

At runtime, you can use ui methods to specify the application behavior at runtime:

LET widget_var = ui.<widget>.ForName("widget_id")

CALL widget_var.setVisible(...)

DISPLAY widget_var.getVisible()

4gl code sample

DEFINE bt_1, bt_2 ui.Button

...

LET bt_1 = ui.Button.ForName("bt1")

LET bt_2 = ui.Button.ForName("bt2")

...

CALL bt_1.setVisible(0)

CALL bt_2.setVisible(1)

DISPLAY "WITH bt1, setVisible=", bt_1.getVisible(), "."

DISPLAY "WITH bt2, setVisible=", bt_2.getVisible(), "."

runtime behavior

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.