ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • Controls taken into account
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
ControlExist (Function)
In french: ChampExiste
Warning
From version 17, FieldExist is kept for backward compatibility. This function has been replaced with ControlExist.
Checks for a control (or group of controls) in a window, page or report.
Example
// Check for the "EditName" control
ResExist = ControlExist("EditName")
Syntax
<Result> = ControlExist(<Control used>)
<Result>: Boolean
  • True if the control (or group of controls) exists,
  • False otherwise.
<Control used>: String or Control variable
Control to check for. This parameter can correspond to:
  • the name of the control between quotes. This parameter can also correspond to a group of controls.
    To check for controls in other windows, pages or reports, <Control name> must have the following format:
    "<Name of window, page or report>.<Control name>".
  • New in SaaS
    the name of a variable of type Control.
    AndroidAndroid Widget JavaPHP Not available.
    Note: This feature is only available from WINDEV Suite SaaS 2025 - Update 3.
    For more details, see Using new features exclusive to WINDEV Suite SaaS 2025.
Remarks

Controls taken into account

  • WINDEV Cells in status bars and menu options are not considered controls.
  • AndroidAndroid Widget Menu options are not considered controls.
  • WEBDEV - Server code Table control columns are not considered controls.
Business / UI classification: UI Code
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
PROCEDURE evento_lista_objetos_gpw(ninstancia)
//variaiveis auxiliares
i is int = 1
objs_form is string = ""
sControlName is string = ""
sControles is string = ""

ninstancia = ninstancia

<COMPILE IF Configuration<>"iOS application" AND Configuration<> "Android application">

IF ninstancia = 0 THEN

RESULT ""

ELSE

NomeForm is string = m_Tabela[ninstancia].gs_nomeJanela

WHEN EXCEPTION IN

sControlName = gpwEnumControl(NomeForm, i)

LOOP(5000)

// Process the control
Trace(sControlName)

// Next control
i++

sControlName = gpwEnumControl(NomeForm, i)

IF sControlName <> "" AND sControlName <> Null AND sControlName <> 0 AND sControlName <> VK_EREOF THEN
indirection is string = NoSpace(NomeForm) +"."+ NoSpace(sControlName)
IF ControlExist(sControlName) = True
sControles += indirection + "; "
END
ELSE
BREAK
END

END

RESULT sControles

DO
IF ExceptionInfo(errCode) THEN
RESULT sControles
Boller
02 Sep. 2023

Last update: 06/20/2025

Send a report | Local help