PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Finding out the pane of a tab control
EnumControl (Example)
Finding out the pane of a tab control
WINDEVReports and QueriesWindows MobileUser code (UMC) The following code is used to find out the pane of a control found in a tab. The GetPane procedure is used to find a control among the controls found in the tab panes.
FUNCTION GetPane(TabName, ControlName)
// In which tab pane is the control found?
i is int
j is int
sControl is string
NbPane is int = {TabName}..Occurrence
TabNum is int = 0
FOR i = 1 TO NbPane
j = 1
sControl = Upper(EnumControl({TabName}[i],j))
WHILE sControl <> ""
// trace(sControl, i)
IF sControl = Upper(ControlName) THEN TabNum = i
j++
sControl = Upper(EnumControl({TabName}[i],j))
END
END
 
RESULT TabNum
 
// Use examples
Info("EDIT1", GetPane("TAB1", "EDIT1"))
Info("EDIT5", GetPane("TAB1", "EDIT5"))
Info("EDIT3", GetPane("TAB1", "EDIT3"))
Info("CUSTNAME", GetPane("TAB1", "CUSTNAME"))
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment