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
  • Report (Report editor): Visible or invisible control/block
  • State of a group of controls
  • State of a column in a Table control
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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.
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,
  • an control "container" (Tab control, Internal page, Layout, etc.),
  • of a group of controls.
WEBDEV - Código Servidor 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
// Le champ LIB_Libellé1 devient actif
LIB_Libellé1.Etat = Active
WEBDEV - Código ServidorPHPAjax
// 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
Sintaxis
WEBDEV - Código ServidorWEBDEV - Código NavegadorPHPAjax

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

<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 - Código Navegador 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 - Código ServidorWEBDEV - Código NavegadorPHPAjax

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

<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 - 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.
WEBDEV - Código Servidor

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

<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.
WEBDEV - Código Servidor

Modify the report of an element in an report Ocultar los detalles

<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).
Observaciones

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.

Limits

WEBDEV - Código Servidor The State property has no effect on reports created with the report editor.
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: 24/05/2024

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