I use the Enumeration very often.
Code: Select all
Enumeration EWindow
#WND_Main
#WND_Preview
; ...
EndEnumeration
Enumeration EGadget
#GDT_btnRefresh
#GDT_lstPreview
; ...
EndEnumeration
Code: Select all
Enumeration EWindow
#WND_Editor
; ...
EndEnumeration
Enumeration EGadget
#GDT_Editor_btnApply
#GDT_Editor_edtContent
; ...
EndEnumeration
Code: Select all
Low(<Enumeration>)
High(<Enumeration>)
Code: Select all
;// sample code
For idxWindow = Low(EWindow) To High(EWindow)
HideWindow(idxWindow, #True)
Next idxWindow
Maybe there is a small problem with the use of the optional [step]
My work-around so far is like this:
Code: Select all
;// add this lines behind the first Enumeration
Macro Lo_Window : #WND_Main : EndMacro ; <= my style guide requires #WND_Main as the first Window (Value == 1)
Macro Hi_Window : #PB_Compiler_EnumerationValue : EndMacro
;// add this line behind the next Enumerations
UndefineMacro Hi_Window : Macro Hi_Window : #PB_Compiler_EnumerationValue : EndMacro