PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Visible or invisible control/block
  • State of a group of controls
  • State of a column in a Table control
  • Tabs and controls of a tab pane
  • Radio Button/Check Box controls and their options
  • Active control made invisible or not
  • Limitations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The State property can be used:
  • in a report.
  • in a window.
  • in a page.
Universal Windows 10 AppiPhone/iPad In a report, the State property is used to get and change the state:
  • of a control,
  • of a report block.
Remark: In a report, the State property can only be used to set the visibility of a control or a block (controls and blocks cannot be grayed out). In this case, this property is available for backward compatibility with WINDEV 5.5 and WEBDEV 1.5. To show or hide a control or a block in a report, use the Visible property.
WINDEV Mobile In a window, the State property is used to get and change the state:
  • of a window,
  • of a control or group of controls,
  • of a table cell or table row,
  • of a menu option.
Versions 15 and later
Android This property is now available for Android applications.
New in version 15
Android This property is now available for Android applications.
Android This property is now available for Android applications.
Versions 17 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for iPhone/iPad applications.
iPhone/iPad This property is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store apps mode.
iPhone/iPad This property is now available for report controls or blocks in iPhone/iPad applications.
New in version 18
Universal Windows 10 App This property is now available in Windows Store apps mode.
iPhone/iPad This property is now available for report controls or blocks in iPhone/iPad applications.
Universal Windows 10 App This property is now available in Windows Store apps mode.
iPhone/iPad This property is now available for report controls or blocks in iPhone/iPad applications.
Versions 20 and later
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
New in version 20
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Example
Universal Windows 10 AppAndroidiPhone/iPadIOS Widget
// The STC_Static1 control becomes active
STC_Static1.State = Active
Universal Windows 10 AppAndroidIOS Widget
// The EDT_Edit1 control becomes active
EDT_Edit1.State = Active
// Modify the content of the Combo Box if it is active
IF COMBO_Combo1.State = Active THEN
COMBO_Combo1 = "<Enter HERE>"
SetFocusAndReturnToUserInput(COMBO_Combo1)
END
Syntax
Universal Windows 10 AppiPhone/iPadIOS Widget

Getting the state of an element in a report Hide the details

<Current state> = <Element name>.State
<Current state>: Integer constant
Current state of the object.
ActiveThe control or block is visible.
InvisibleInvisible control or block (it is recommended to use the Visible property).
<Element name>: Character string
Name of report control or block.
Universal Windows 10 AppiPhone/iPadIOS Widget

Modifying the state of an element in a report Hide the details

<Element name>.State = <New state>
<Element name>: Character string
Name of report control or block.
<New state>: Integer constant
New state of the object.
ActiveThe control or block is visible.
InvisibleInvisible control or block (it is recommended to use the Visible property).
Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

Getting the state of a window or an element in a window Hide the details

<Current state> = <Element name>.State
<Current state>: Integer constant
Current state of the object.
Window controls
ActiveThe control is active and editable.
ReadOnlyNoSelectionFor the Table controls only: The control is read-only, no input is allowed.

In this case, the user will not be able to select a table row with the mouse or with the arrows. A row can only be selected through programming with TableSelectPlus. This row will be selected via the selection bar.
DisplayOnly or InactiveThe control is read-only, no input or action is allowed.
For the Table, TreeView Table and Looper controls, the user will be able to select a table row. It can also be selected through programming (with TableSelectPlus for the tables).
GrayedControl grayed out.
Table row or Table cell, TreeView table, List Box, ListView, Combo Box, Looper
ActiveThe control is enabled and editable (if the table is in edit mode).
ReadOnlyNoSelectionThe control is read-only, no input or action is allowed. The user will not be able to select a table row with the mouse or with the arrow keys. A row can only be selected through programming with TableSelectPlus.

This row will be selected via the selection bar.
GrayedThe control is grayed out
Windows
ActiveWindow that can be handled by the user.
DisplayOnlyThe controls of the window can no longer be modified. However, the user will be able to modify the row selected in the Table, TreeView Table or Looper controls. The window cannot be moved.
GrayedGrays out all window controls.
OutsideScreenThe window is active but its coordinates are negative
<Element name>: Character string
Name of control, table row, cell, group of controls or window.
Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

Modifying the state of an element in a window or the state of a window Hide the details

<Element name>.State = <New state>
<Element name>: Character string
Name of control, table row, cell, group of controls or window.
<New state>: Integer constant
New state of element.
Window controls
ActiveThe control is active and editable.
ReadOnlyNoSelectionFor the Table controls only: The control is read-only, no input is allowed.
In this case, the user will not be able to select a table row with the mouse or with the arrows. A row can only be selected through programming with TableSelectPlus. This row will be selected via the selection bar.
DisplayOnly or InactiveThe control is read-only, no input or action is allowed.
For the Table, TreeView Table and Looper controls, the user will be able to select a row. It can also be selected through programming (with TableSelectPlus for the tables).
GrayedThe control is grayed out
Table row or Table cell, TreeView table, List Box, ListView, Combo Box, Looper
ActiveThe control is enabled and editable (if the table is in edit mode).
ReadOnlyNoSelectionThe control is read-only, no input or action is allowed. The user will not be able to select a table row with the mouse or with the arrow keys. A row can only be selected through programming with TableSelectPlus.
This row will be selected via the selection bar.
GrayedControl grayed out.
Windows
ActiveWindow that can be handled by the user.
DisplayOnlyThe controls of the window can no longer be modified. However, the user will be able to modify the row selected in the Table, TreeView Table or Looper controls. The window cannot be moved.
GrayedGrays out all window controls.
OutsideScreenThe window is active but its coordinates are negative.
Remarks

Visible or invisible control/block

In a report, the only possible state for a control or a block is visible or invisible. To set the visibility of a control, it is recommended to use the Visible property. This property optimizes the management of control visibility.

State of a group of controls

  • Finding out the state of a group of controls: the state corresponds to the state of the first control in the group.
  • Modifying the state of a group of controls: all the controls of the group are modified and correspond to the new state.
AndroidiPhone/iPadIOS Widget

State of a column in a Table control

If the State property is applied to a column, the state of the entire column is changed (and not only the state of a cell).
Caution: the State property only restricts the state of the column defined in the description window. For example, if the column is read-only, no column cell can become editable.
Universal Windows 10 AppAndroidiPhone/iPadIOS Widget

Tabs and controls of a tab pane

The state of a control in a tab pane depends on the state of the tab:
  • If the pane is not selected, the control is invisible.
  • If the pane is selected and invisible, the control is invisible.
  • If the pane is selected and grayed out, the control is grayed out.
  • If the pane is selected and disabled, the control is disabled.
  • If the pane is selected and enabled, the control can be enabled, disabled, grayed out or invisible.
Universal Windows 10 AppAndroidiPhone/iPadIOS Widget

Radio Button/Check Box controls and their options

You can modify the state of the control or the state of an option of the Radio Button/Check Box control. An option can be grayed out or enabled.
  • To modify the state of a Radio Button control:
    RADIO_Radio1.State = Grayed
  • To modify the state of an option in a Radio Button control:
    RADIO_Radio1[2].State = Grayed
Caution: The state of an option depends on the state of the Radio Button control. Therefore, if the following operations are performed:
  1. An option is grayed out.
  2. The Radio Button/Check Box control is grayed out.
  3. The Radio Button/Check Box control is re-enabled. The option is still grayed out.
Universal Windows 10 AppAndroidiPhone/iPadIOS Widget

Active control made invisible or not

The Visible property can be used to hide a control (enabled, grayed out or read-only).
When the control is invisible, it loses all the characteristics of its previous state: the control is invisible and it cannot be used. The only way to run its code is to call ExecuteProcess. For example, an invisible control does not respond when using the shortcut. For example, an active button made invisible does not respond when using the shortcut.
To restore the previous state of the control, simply use the Visible property again.

Limitations

Universal Windows 10 AppiPhone/iPadIOS Widget The State property has no effect on reports.
Universal Windows 10 App The State property has no effect on HTML controls.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment