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 / Funciones WLanguage / Controles, páginas y ventanas / Funciones de controles
  • Focus gain
  • ScreenFirst, SetFocus and SetFocusAndReturnToUserInput
  • SetFocus on the last selected control
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
Set focus:
  • to a control (in a window, in a page or in a frameset).
  • a window.
Ejemplo
// Set focus on the EDT_Edit1 control
SetFocus(EDT_Edit1)
// Set focus on the EDT_Edit1 control in
// the "Registration" page or window
SetFocus(Registration.EDT_Edit1)
// Set focus on MyControl
// found in the LOOP_Customer Looper control.
// Select the second row
LOOP_Customer = 2
SetFocus(LOOP_Customer.MyControl)
Sintaxis

Setting the focus on a control in the current window or page Ocultar los detalles

SetFocus([<Control name>])
<Control name>: Optional control name
Name of control (or column) that will gain focus (see "Remarks"). If this parameter is not specified, the current control gains focus.
A WLanguage error occurs if <Control name> does not correspond to a control found in the current window or in the current page.
WEBDEV - Código Navegador Name of the control that must gain focus (see "Remarks"). If this parameter is not specified, a compilation error appears. If this parameter is a constructed string (e.g.: "Field" + sNumChamp), no check is performed on the field's existence (if the specified field doesn't exist, a Javascript error will appear in the browser).
WEBDEV - Código Navegador

Setting the focus on a control in a page of the current frameset (Internet Explorer only) Ocultar los detalles

SetFocus([<Control in the page>])
<Control in the page>: Character string
Name of the control that will gain focus in the page. This parameter has the following format:
<Page name>.<Control name>
where:
  • <Page name> is the name of the page containing the control that will gain focus.
  • <Control name> is the name of the control that will gain focus. If this parameter is a constructed string (e.g.: "Field" + sNumChamp), no check is performed on the field's existence (if the specified field doesn't exist, a Javascript error will appear in the browser).
Observaciones

Focus gain

Taking "focus" is represented in different ways:
  • Blinking cursor (or "Caret") for the edit controls.
  • Dotted rectangle for the other types of controls (Buttons, List Boxes, Radio Buttons, etc.).
Please note Not all field types (e.g. "label" fields) can take focus.

ScreenFirst, SetFocus and SetFocusAndReturnToUserInput

These functions have a different behavior:
  • SetFocusAndReturnToUserInput stops the current process to force the input in the specified control.
  • ScreenFirst defines which control will receive input focus (when the current code stops and input focus is set back to a control).
  • SetFocus stops the current process, defines which control will receive input focus and resumes the current process.
Windows

SetFocus on the last selected control

SetFocus used without parameters sets the focus on the current control. This function, called in the exit code of an Edit control, is used to force the input in the selected control if the data entered and the expected data do not match.
The control type must be:
  • edit control.
  • Check Box control.
  • Radio Button control.
  • List Box control.
  • Combo Box control.
  • Click Area control.
Clasificación Lógica de negocio / UI: Código UI
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

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