I turn to you because I have a little problem
in developing my program I put a standard type menu (file, config help) but at compile time it does not appear on the window
I do not see why
Have you any idea?
I'm on Ubuntu 14.04 LTS and 5.22 LTS in PureBasic
Here is a snippet:
the hand below :
Code: Select all
IncludeFile "win_1.pbf"
Procedure Quit()
End
EndProcedure
OpenWindow_1()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case BT_Quitter
Quit()
EndSelect
Case #PB_Event_Menu
Select EventMenu()
Case #Quitter
Quit()
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
Code: Select all
;
; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.
;
Global Window_1
Enumeration FormGadget
#BT_Quitter
EndEnumeration
Enumeration FormMenu
#Quitter
#Aide
EndEnumeration
Procedure OpenWindow_1(x = 0, y = 0, width = 150, height = 110)
Window_1 = OpenWindow(#PB_Any, x, y, width, height, "", #PB_Window_SystemMenu)
CreateMenu(0, WindowID(Window_1))
MenuTitle("Fichier")
MenuItem(#Quitter, "Quitter")
MenuTitle("?")
MenuItem(#Aide, "Aide")
ButtonGadget(#BT_Quitter, 30, 30, 90, 30, "Quitter")
EndProcedure
Procedure Window_1_Events(event)
Select event
Case #PB_Event_CloseWindow
ProcedureReturn #False
Case #PB_Event_Menu
Select EventMenu()
Case #Quitter
Case #Aide
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure

thank you in advance