ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • Controls taken into account
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
ControlExist (Function)
In french: ChampExiste
Warning
From version 17, FieldExist is kept for backward compatibility. This function is replaced by ControlExist.
Checks the existence of a control (or group of controls) in a window, in a page or in a report.
Example
// Check the existence of the "EditName" control
ResExist = ControlExist("EditName")
Syntax
<Result> = ControlExist(<Control name>)
<Result>: Boolean
  • True if the control (or group of controls) exists,
  • False otherwise.
<Control name>: Character string
Name of the control that must be checked between quotes. This parameter can also correspond to a group of controls.
To check the existence of controls in other windows, pages or reports, <Control Name> must have the following format:
"<Name of Window, Page or Report>.<Control Name>".
Remarks

Controls taken into account

  • WINDEV The cells in status bars and the menu options are not considered as being controls.
  • AndroidAndroid Widget The menu options are not considered as being controls.
  • WEBDEV - Server code The columns found in the Table controls are not considered as being controls.
Component: wd290vm.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: 05/26/2022

Send a report | Local help