ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • Invisible, inactive or grayed out control
  • Miscellaneous
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
Count (Function)
In french: Occurrence
Returns the number of occurrences of a control in a window, in a page or in a group of controls.
Example
// Initialize the EDT_Label control if it exists
IF Count(EDT_Label) > 0 THEN
Display_Label()
END
Syntax
<Result> = Count(<Search control>)
<Result>: Integer
  • Number of controls with the same name found in the window or in the page.
  • Number of controls found in a group of controls.
  • 0 if the control does not exist.
<Search control>: Control name or character string
Name of the control or name of the group of controls.
If this parameter corresponds to an empty string (""), it is automatically replaced with the name of the control to which the current event belongs.
For the indexed controls, there is no need to specify the subscript.
Remarks

Invisible, inactive or grayed out control

An invisible, inactive or grayed control is considered as being found in the window or in the page.

Miscellaneous

Caution: A control must not be directly used in a process where its existence is checked. A runtime error will occur if the control does not exist.
Example (of what not to do):
IF Count(EDT_Control1) > 0 THEN
EDT_Control1 = "Foo"
END
Example (of what to do):
IF Count(EDT_Control1) > 0 THEN
CallProcedure(EDT_Control1)
END
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/06/2023

Send a report | Local help