
J'ai essayé de faire un ptit programme, mais il y a un petit probleme au niveau de la Frame3DGadget, mais je ne sais pas quoi.

Bref, quand je compile, que j'execute, et qu'enfin j'appuis sur le menu essais (puis le sous-menu essais), la fenetre disparait, se minimise ou je sais pas quoi. En même temps que ce phénomène incomprehensible se passe, le debuggeur me dit qu'il n'y a aucune GadgetList() actuellement, et donc que le ButtonGadget ne peut s'initialiser dans la fenêtre Essais

Enfin, je ne comprends pas ce qu'il se passe

Voila mon petit code:
Code : Tout sélectionner
Enumeration
#Window
#MDI
#Menu
#Menu_rien
EndEnumeration
Enumeration
#Essais1
#Essais2
#Essais3
EndEnumeration
Structure MDIWindow
Window.f
Button.f
Frame3DGadget.f
StringGadget.f
EndStructure
Global NewList MDIWindow.MDIWindow()
OpenWindow(#Window, 300, 50, 900, 650, "Dzoumaka network [Tool - D&W plateform]", #PB_Window_SystemMenu | #PB_Window_TitleBar )
CreateMenu(#Menu, WindowID(#Window))
MenuTitle("Essais")
MenuItem(1, "Essais")
MDIGadget(#MDI, 0, 0, 850, 650, 1, #Menu_rien, #PB_MDI_AutoSize)
Repeat ;-Boucle principale
event=WaitWindowEvent(10)
If event=#PB_Event_CloseWindow
Window=EventWindow()
If Window=#Window
End
ElseIf Window=MDIWindow()\Window
If ListSize(MDIWindow())<>0
CloseWindow(Window=MDIWindow()\Window)
EndIf
EndIf
ElseIf event=#PB_Event_Menu
Select EventMenu()
Case 1
LastElement(MDIWindow())
AddElement(MDIWindow())
MDIWindow()\Window=AddGadgetItem(#MDI, -1, "Essais")
ResizeWindow(MDIWindow()\Window, 0, 0, 150, 109)
width=WindowWidth(MDIWindow()\Window)
height=WindowHeight(MDIWindow()\Window)
WindowBounds(MDIWindow()\Window, width, height, width, height)
MDIWindow()\Frame3DGadget=Frame3DGadget(#Essais1, 10, 10, 130, 50, "")
MDIWindow()\Button=ButtonGadget(#Essais2, 40, 70, 70, 30, "Check")
MDIWindow()\StringGadget=StringGadget(#Essais3, 20, 30, 110, 20, "")
EndSelect
EndIf
ForEver