AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Propiedades WLanguage / Propiedades varias
  • Status (Status editor): Visible or invisible field/block
  • State of a group of controls
  • State of a column in a Table control
  • Tabs and controls in a tab pane
  • Sidebar and controls in a tab pane
  • Radio Button/Check Box controls and their options
  • Active control made invisible or not
  • Menu options
  • Limitations
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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,
  • of a "container" control (Tab control, Internal Window, Layout, etc.),
  • of a cell or row in a Table control,
  • of a menu option.
WEBDEV - Código ServidorWEBDEV - Código Navegador In a page, the State property is used to get and change the state:
  • of a control or group of controls,
  • of a "container" control (Tab control, Internal Page, Layout, etc.),
  • of a group of controls.
WINDEVWEBDEV - Código ServidorReportes y ConsultasAndroidiPhone/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.
Ejemplo
// The STC_Static1 control becomes active
STC_Static1.State = Active
WINDEVWEBDEV - Código ServidorAndroidIOS WidgetJavaCódigo de Usuario (UMC)PHPAjax
// 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
WINDEV
// Gray out 4th row in the Table control
TABLE_Customer[4].State = Grayed
// Gray out the 1st cell of column 2
COL_COL2[1].State = Grayed
// Makes the 5th row neither clickable nor editable
TABLE_Customer[5].State = ReadOnlyNoSelection
// Makes the 2nd cell of column 3 neither clickable nor editable
COL_COL3[2].State = ReadOnlyNoSelection
// Makes the cell active
COL_COL3[2].State = Active
Novedad versión 2025
WINDEV
// Control content is blurred
EDT_Name.State = DisabledBlur
// Blur radius
EDT_Name.Effect.Blur.Radius = 12
Sintaxis
WINDEVAndroidiPhone/iPadIOS WidgetApple WatchJavaCódigo de Usuario (UMC)

Getting the state of a window or an element in a window Ocultar los detalles

<Current state> = <Element name>.State
<Current state>: Integer constant
Current status of object.
Window controls
ActiveThe control is active and editable.
ReadOnlyNoSelectionFor Table fields only: Field displayed, no input possible..

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 with the selection bar.
DisplayOnly or InactiveThe control is read-only, no input or action is allowed.
For Table, Hierarchical Table and RepeatString fields, the user can select a line.. It can also be selected programmatically (using TableSelectPlus in Table controls, for example).
GrayedGrayed-out control.
Novedad versión 2025
InactifFlou
Inactive field with blurred content.
Available for Static Text control, Edit control, Image and Combo Box control.
The default blur radius is 12. This radius can be modified using the Effect property. The larger the radius, the greater the blurring.
AndroidiPhone/iPadIOS WidgetApple WatchJava This constant is not available.
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 with 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.
WINDEVAndroidiPhone/iPadIOS WidgetApple WatchJavaCódigo de Usuario (UMC)

Changing the state of a window or an element in a window Ocultar los detalles

<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 the element.
Window controls
ActiveThe control is active and editable.
ReadOnlyNoSelectionFor Table fields only: Field displayed, no input possible..

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 with the selection bar.
DisplayOnly or InactiveThe control is read-only, no input or action is allowed.
For Table, Hierarchical Table and RepeatString fields, the user can select a line.. It can also be selected programmatically (using TableSelectPlus in Table controls, for example).
GrayedGrayed-out control.
Novedad versión 2025
InactifFlou
Inactive field with blurred content.
Available for Static Text control, Edit control, Image and Combo Box control.
The default blur radius is 12. This radius can be modified using the Effect property. The larger the radius, the greater the blurring.
AndroidiPhone/iPadIOS WidgetApple WatchJava This constant is not available.
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 with 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 - Código ServidorWEBDEV - Código NavegadorPHPAjax

Finding out the state of a control in a page Ocultar los detalles

<Current state> = <Control name>.State
<Current state>: Integer constant
Current status of object.
Active or VisibleThe control is active and editable.
GrayedGrayed-out control.
InactiveEdit control visible but read-only (applies to the edit controls only).
InvisibleInvisible (it is recommended to use the Visible property).
WEBDEV - Código Navegador This constant is not available. Use the Visible property.
Please note: on List and Combo Box controls, the 'Inactive' state behaves like the 'grayed' state.
<Control name>: Character string
Name of control or group of controls.
WEBDEV - Código ServidorWEBDEV - Código NavegadorPHPAjax

Changing the state of a control in a page Ocultar los detalles

<Control name>.State = <New state>
<Control name>: Character string
Name of control or group of controls.
<New state>: Integer constant
New object state.
Active or VisibleThe control is active and editable.
GrayedGrayed-out control.
InactiveEdit control visible but read-only (applies to the edit controls only).
InvisibleInvisible (it is recommended to use the Visible property).
WEBDEV - Código Navegador 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 - Código ServidorReportes y ConsultasiPhone/iPadIOS Widget

Getting the state of an element in a report Ocultar los detalles

<Current state> = <Element name>.State
<Current state>: 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 - Código ServidorReportes y ConsultasiPhone/iPadIOS Widget

Changing the state of an element in a report Ocultar los detalles

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

Status (Status editor): Visible or invisible field/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

  • Find out the status of a group of fields: the status returned corresponds to the status of the first field in the group.
  • Modify the status of a group of fields: all the fields in the group are modified to match the new status.

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).
Please note: the State property can only be used to restrict the column status defined in the description window.. For example, if the column is read-only, no column cell can become editable.
WINDEVAndroidiPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)

Tabs and controls in a tab pane

The state of a control in a tab pane depends on the state of the tab:
  • If the tab is not selected, the control is invisible.
  • If the tab is selected and invisible, the control is invisible.
  • If the tab is selected and grayed out, the control is grayed out.
  • If the tab is selected and disabled, the control is disabled.
  • If the tab is selected and enabled, the control can be enabled, disabled, grayed out or invisible.
WINDEVCódigo de Usuario (UMC)

Sidebar and controls in a tab pane

The state of a control in a sidebar pane depends on the state of the tab:
  • If the tab is not selected, the control is invisible.
  • If the tab is selected and invisible, the control is invisible.
  • If the tab is selected and grayed out, the control is grayed out.
  • If the tab is selected and disabled, the control is disabled.
  • If the tab is selected and enabled, the control can be enabled, disabled, grayed out or invisible.
WINDEVAndroidiPhone/iPadIOS WidgetJavaCódigo de Usuario (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:
    RADIO_Radio1.State = Grayed
  • To change 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.
WINDEVAndroidiPhone/iPadIOS WidgetJavaCódigo de Usuario (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 field is invisible, it loses all the characteristics of its previous state: the field is invisible and 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.

Limitations

WINDEVWEBDEV - Código ServidorReportes y ConsultasiPhone/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.
  • Wording.
  • Edit control.
  • Image.
  • Check Box.
  • Radio Button.
  • List Box.
  • Combo Box.
  • TreeView.
  • Tab.
  • Window.
  • Table.
  • Table column.
  • Supercontrol.
WEBDEV - Código Navegador The State property has no effect on the following elements:
  • Table,
  • TreeView Table,
  • Looper
  • Linear Looper
  • Table column.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
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 09 2023

Última modificación: 14/12/2024

Señalar un error o enviar una sugerencia | Ayuda local