ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Various properties
  • Report (Report editor): 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
  • Sidebar and pane controls
  • Radio Button/Check Box controls and their options
  • Active control made invisible or not
  • Menu options
  • Limits
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 gets and sets the state:
  • of a control in a window, page or report.
  • of a block in a report,
  • of a window.
WINDEVWINDEV 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,
  • an control "container" (Tab control, Internal window, Layout, etc.),
  • of a cell or row in a Table control,
  • of a menu option.
WEBDEV - Server codeWEBDEV - Browser code In a page, the State property is used to get and change the state:
  • of a control or group of controls,
  • an control "container" (Tab control, Internal page, Layout, etc.),
  • of a group of controls.
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppAndroidiPhone/iPad In a report, the State property is used to get and change the visibility of a control or block. This property is kept for 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.
Example
// Le champ LIB_Libellé1 devient actif
LIB_Libellé1.Etat = Active
WINDEVWEBDEV - Server codeUniversal Windows 10 AppAndroidIOS WidgetJavaUser code (UMC)PHPAjax
// Le champ SAI_Saisie1 devient actif
SAI_Saisie1.Etat = Active
// Modification du contenu de la combo si elle est active
IF COMBO_Combo1.Etat = Active THEN
	COMBO_Combo1 = "<Saisir ICI>"
	SetFocusAndReturnToUserInput(COMBO_Combo1)
END
WINDEV
// Grise la 4ème ligne du champ Table
TABLE_Client[4].Etat = Grayed
// Grise la 1ère cellule de la colonne 2
COL_COL2[1].Etat = Grayed
// Rend la 5ème ligne ni cliquable ni saisissable
TABLE_Client[5].Etat = ReadOnlyNoSelection
// Rend la 2ème cellule de la colonne 3 ni cliquable ni saisissable
COL_COL3[2].Etat = ReadOnlyNoSelection
// Rend la cellule active
COL_COL3[2].Etat = Active
Syntax
WINDEVUniversal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple WatchJavaUser code (UMC)

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 status of object.
Window controls
ActiveThe control is active and editable.
ReadOnlyNoSelectionFor Table controls only: The control is read-only, no input is allowed.

In this case, the user will not be able to select a row in the Table control using the mouse or the arrow keys. A row can only be selected programmatically 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 programmatically (using TableSelectPlus in Table controls, for example).
GrayedControl grayed out.
Row or cell in a Table, TreeView Table, List Box, ListView, Combo Box, Looper control
ActiveThe control is enabled and is in edit mode (if the Table control is in edit mode).
ReadOnlyNoSelectionThe control is read-only, no input or action is allowed. The user will not be able to select a row in the control using the mouse or the arrow keys. Rows can only be selected programmatically (using TableSelectPlus in Table controls, for example).

This row will be selected via the selection bar.
GrayedGrayed field
Java Feature not supported.
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.
WINDEVUniversal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple WatchJavaUser code (UMC)

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

<Element name>.State = <New report>
<Element name>: Character string
Name of control, table row, cell, group of controls or window.
<New report>: Integer constant
New state of the element.
Window controls
ActiveThe control is active and editable.
ReadOnlyNoSelectionFor Table controls only: The control is read-only, no input is allowed.

In this case, the user will not be able to select a row in the Table control using the mouse or the arrow keys. A row can only be selected programmatically 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 programmatically (using TableSelectPlus in Table controls, for example).
GrayedControl grayed out.
Row or cell in a Table, TreeView Table, List Box, ListView, Combo Box, Looper control
ActiveThe control is enabled and is in edit mode (if the Table control is in edit mode).
ReadOnlyNoSelectionThe control is read-only, no input or action is allowed. The user will not be able to select a row in the control using the mouse or the arrow keys. Rows can only be selected programmatically (using TableSelectPlus in Table controls, for example).

This row will be selected via the selection bar.
GrayedGrayed field
Java Feature not supported.
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
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Finding out the state of a control in a page Hide the details

<Report in progress> = <Control name>.State
<Report in progress>: Integer constant
Current status of object.
Active or VisibleThe control is active and editable.
GrayedControl grayed out.
InactiveThe edit control is visible and read-only (applies to the edit controls only).
InvisibleInvisible (it is recommended to use the Visible property).
WEBDEV - Browser code This constant is not available. Use the Visible property.
Remark: in List Box and Combo Box controls, 'Disabled' is equivalent to 'Grayed'.
<Control name>: Character string
Name of control or group of controls.
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Changing the state of a control in a page Hide the details

<Control name>.State = <New report>
<Control name>: Character string
Name of control or group of controls.
<New report>: Integer constant
New status of object.
Active or VisibleThe control is active and editable.
GrayedControl grayed out.
InactiveThe edit control is visible and read-only (applies to the edit controls only).
InvisibleInvisible (it is recommended to use the Visible property).
WEBDEV - Browser code This constant is not available. Use the Visible property.
Remarks:
  • In List Box and Combo Box controls, 'Disabled' is equivalent to 'Grayed'.
  • The change of state may result in slightly different effects depending on the browser used. For example, the grayed state will be more noticeable in Internet Explorer and Chrome than in Firefox.
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppiPhone/iPadIOS Widget

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

<Report in progress> = <Element name>.State
<Report in progress>: Integer constant
Current status of 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.
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppiPhone/iPadIOS Widget

Modify the report of an element in an report Hide the details

<Element name>.State = <New report>
<Element name>: Character string
Name of report control or block.
<New report>: Integer constant
New status of object.
ActiveThe control or block is visible.
InvisibleInvisible control or block (it is recommended to use the Visible property).
Remarks

Report (Report editor): 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.
  • Changing the state of a group of controls: all the controls of the group are modified and correspond to the new state.

State of a column in a Table control

If the State property is applied to a column of a Table control, the state of the entire column is changed (and not only the state of the 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.
WINDEVUniversal Windows 10 AppAndroidiPhone/iPadIOS WidgetJavaUser code (UMC)

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 active, the field can be active, inactive, grayed out or Invisible.
WINDEVUser code (UMC)

Sidebar and pane controls

The state of a control found in a sidebar pane depends on the state of the pane:
  • 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 active, the field can be active, inactive, grayed out or Invisible.
WINDEVUniversal Windows 10 AppAndroidiPhone/iPadIOS WidgetJavaUser code (UMC)

Radio Button/Check Box controls and their options

You can change 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 change the state of a Radio Button control:
    SEL_Select1.Etat = Grisé
  • To change the state of an option in a Radio Button control:
    SEL_Select1[2].Etat = Grisé
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.
WINDEVUniversal Windows 10 AppAndroidiPhone/iPadIOS WidgetJavaUser code (UMC)

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.
WINDEV

Menu options

The State property determines if the menu option is enabled or greyed out. To show or hide a menu option, use the Visible property.
iPhone/iPad The State property hides a context menu option.

Limits

WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppiPhone/iPadIOS Widget The State property has no effect on reports created with the report editor.
Java The State property can only be used with the following elements:
  • Button.
  • Libellé.
  • Edit control.
  • Image.
  • Check Box.
  • Radio Button.
  • List Box.
  • Combo Box.
  • TreeView.
  • Tab.
  • Window.
  • Table.
  • Table column.
  • Supercontrol.
Universal Windows 10 App The State property has no effect on HTML controls.
WEBDEV - Browser code The State property has no effect on the following elements:
  • Table,
  • TreeView Table,
  • Looper
  • Linear Looper
  • Table column.
Minimum version required
  • Version 9
This page is also available for…
Comments
PROCEDURE evento_state_fields(myNameWindow,myNameControl)
// ReadOnlyNoSelection // OutsideScreen // Grayed // DisplayOnly // Active

Indirection is string = myNameWindow +"."+ myNameControl

SWITCH {Indirection}..State
CASE Active
RESULT "1-Active"
CASE ReadOnlyNoSelection
RESULT "2-ReadOnly"
CASE Grayed
RESULT "3-Grayed"
CASE DisplayOnly
RESULT "4-DisplayOnly"
OTHER CASE
RESULT "5-Other"
END
Boller
02 Sep. 2023

Last update: 05/24/2024

Send a report | Local help