Bonjour Falsam,
#PB_Any est déjà disponible via les paramètres (Settings) en cochant la case Variable #PB_Any.
L'option est pour
tous les contrôles. Voici un exemple du code généré :
Code : Tout sélectionner
EnableExplicit
;- Global
Global iWindow_0.i
Global iButton_1.i
Global iCheckbox_1.i
;- Declare
Declare Open_Window_0(X = 0, Y = 0, Width = 640, Height = 480)
Procedure Open_Window_0(X = 0, Y = 0, Width = 640, Height = 480)
iWindow_0 = OpenWindow(#PB_Any, X, Y, Width, Height, "Title", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
If iWindow_0
iButton_1 = ButtonGadget(#PB_Any, 20, 20, 200, 60, "Button_1")
iCheckbox_1 = CheckBoxGadget(#PB_Any, 20, 100, 200, 30, "Checkbox_1")
EndIf
EndProcedure
;- Main Program
Open_Window_0()
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Sinon, voici le code généré en cochant la case Constant:
Code : Tout sélectionner
EnableExplicit
;- Enumerations
Enumeration Window
#Window_0
EndEnumeration
Enumeration Gadgets
#Button_1
#Checkbox_1
EndEnumeration
;- Declare
Declare Open_Window_0(X = 0, Y = 0, Width = 640, Height = 480)
Procedure Open_Window_0(X = 0, Y = 0, Width = 640, Height = 480)
If OpenWindow(#Window_0, X, Y, Width, Height, "Title", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
ButtonGadget(#Button_1, 20, 20, 200, 60, "Button_1")
CheckBoxGadget(#Checkbox_1, 20, 100, 200, 30, "Checkbox_1")
EndIf
EndProcedure
;- Main Program
Open_Window_0()
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
#
Oui, le SplitterGadget est manquant. Tous les gadgets actuels, y compris les conteneurs (Container, Panel, Scrollarea, Canvas container) sont supportés sauf celui là.
Je n'ai pas vu comment le faire simplement dans le modèle actuel et j'ai préféré aller de l'avant plutôt que de rester bloqué sur ce cas particulier.
Mais bon, il faudra que je regarde à nouveau, plus tard, en espérant trouver une bonne idée.