;can I do enumeration in procedures or must enumeration always on top of the program ??
Code: Select all
Enumeration
#main_win: #font
#F1 ;functietoets met add
EndEnumeration
;-------------------------------------------------------
Global win_color.l=RGB(115,122,121)
;-------------------------------------------------------
Declare sneltoets()
;Declare set_knop_kleur(id,text$)
;-------------------------------------------------------
LoadFont(#font,"caladea",18, #PB_Font_Italic|#PB_Font_Bold)
If OpenWindow (#main_win,0,0,500,500, "ENURATION TEST" ,flags )
sneltoets() ;aanroep van procedure voor installatie sneltoetsen AddKeyboardShortcut(#main_win, #PB_Shortcut_F1,#F1)
Repeat
Ev = WaitWindowEvent()
Select ev ;
Case #PB_Event_Menu , #PB_Event_Gadget ;dit werkt verschillende case scheiden met komma
Select EventGadget() | EventMenu()
Case #F1 ;main
Debug "F1 pressed"
EndSelect
EndSelect
Until ev=#PB_Event_CloseWindow
EndIf
End
;--------------------------------------------------------
Procedure test1() ;<- is this possible enumerate in a procedure ?
Enumeration
#var1
#var2
EndEnumeration
; other code
;
;
EndProcedure
;--------------------------------------------------------------
Procedure test2()
Enumeration
#var1 ; <- is this also possible ,using the same Enumeration ,its locale in the procedure or not ?
#var3
#var4
EndEnumeration
; other code
;
;
EndProcedure
;--------------------------------------------------------------
Procedure sneltoets()
AddKeyboardShortcut(#main_win, #PB_Shortcut_F1,#F1)
EndProcedure