I've created a small app that consists of three simple menus and a canvas in a window.
I can click on each menu and they appear as they should, however if I select a menu then move to any other menu, the first menu list is still visible, although loses its focus.
Removing the CreateCanvas command cause the program to work properly, however I need the canvas as I'm drawing images etc. onto it
Here is a cutdown version
What am I doing wrong?
I can click on each menu and they appear as they should, however if I select a menu then move to any other menu, the first menu list is still visible, although loses its focus.
Removing the CreateCanvas command cause the program to work properly, however I need the canvas as I'm drawing images etc. onto it
Here is a cutdown version
Local style = WINDOW_TITLEBAR | WINDOW_MENU | WINDOW_CLIENTCOORDS Local MyWindow:TGadget Local filemenu:TGadget Local editmenu:TGadget Local helpmenu:TGadget Local canvas:TGadget MyWindow=CreateWindow("Max GUI App.", 112,84,800,600,Null,style) filemenu=CreateMenu("&File ",0,WindowMenu(MyWindow)) CreateMenu "&New",101,filemenu,KEY_N,MODIFIER_COMMAND CreateMenu "&Open file",102,filemenu,KEY_O,MODIFIER_COMMAND CreateMenu "&Close file",103,filemenu,KEY_C,MODIFIER_COMMAND CreateMenu"",0,filemenu CreateMenu "&Save",104,filemenu,KEY_S,MODIFIER_COMMAND CreateMenu"",0,filemenu CreateMenu "&Open bitmap image",105,filemenu,KEY_I,MODIFIER_COMMAND CreateMenu"",0,filemenu CreateMenu "&Exit",106,fileMenu,KEY_F4,MODIFIER_COMMAND editmenu=CreateMenu("&Edit ",0,WindowMenu(MyWindow)) CreateMenu "Cu&t",107,editmenu,KEY_X,MODIFIER_COMMAND CreateMenu "&Copy",108,editmenu,KEY_C,MODIFIER_COMMAND CreateMenu "&Paste",109,editmenu,KEY_V,MODIFIER_COMMAND helpmenu=CreateMenu("&Help ",0,WindowMenu(MyWindow)) CreateMenu "&About",110,helpmenu canvas=CreateCanvas(0,0,800,640,MyWindow) UpdateWindowMenu MyWindow While True WaitEvent Select EventID() Case EVENT_MENUACTION Select EventData() Case 106 End Case 110 Notify "About stuff here" End Select End Select Wend
What am I doing wrong?