Xink Posted August 10, 2007 Share Posted August 10, 2007 (edited) Hello, I have this example from the help of AutoIT. CODE#include <GUIConstants.au3> GUICreate("My GUI menu",300,200) Global $defaultstatus = "Ready" Global $status $filemenu = GUICtrlCreateMenu ("&File") $fileitem = GUICtrlCreateMenuitem ("Open",$filemenu) GUICtrlSetState(-1,$GUI_DEFBUTTON) $helpmenu = GUICtrlCreateMenu ("?") $saveitem = GUICtrlCreateMenuitem ("Save",$filemenu) GUICtrlSetState(-1,$GUI_DISABLE) $infoitem = GUICtrlCreateMenuitem ("Info",$helpmenu) $exititem = GUICtrlCreateMenuitem ("Exit",$filemenu) $recentfilesmenu = GUICtrlCreateMenu ("Recent Files",$filemenu,1) $separator1 = GUICtrlCreateMenuitem ("",$filemenu,2) ; create a separator line $viewmenu = GUICtrlCreateMenu("View",-1,1) ; is created before "?" menu $viewstatusitem = GUICtrlCreateMenuitem ("Statusbar",$viewmenu) GUICtrlSetState(-1,$GUI_CHECKED) $okbutton = GUICtrlCreateButton ("OK",50,130,70,20) GUICtrlSetState(-1,$GUI_FOCUS) $cancelbutton = GUICtrlCreateButton ("Cancel",180,130,70,20) $statuslabel = GUICtrlCreateLabel ($defaultstatus,0,165,300,16,BitOr($SS_SIMPLE,$SS_SUNKEN)) GUISetState () While 1 $msg = GUIGetMsg() If $msg = $fileitem Then $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)") If @error <> 1 Then GUICtrlCreateMenuitem ($file,$recentfilesmenu) EndIf If $msg = $viewstatusitem Then If BitAnd(GUICtrlRead($viewstatusitem),$GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($viewstatusitem,$GUI_UNCHECKED) GUICtrlSetState($statuslabel,$GUI_HIDE) Else GUICtrlSetState($viewstatusitem,$GUI_CHECKED) GUICtrlSetState($statuslabel,$GUI_SHOW) EndIf EndIf If $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton Or $msg = $exititem Then ExitLoop If $msg = $infoitem Then Msgbox(0,"Info","Only a test...") WEnd GUIDelete() Exit The menu in above example is sunken and the rest of the GUi is not, is it possible both sunken or both not sunken? Edited August 10, 2007 by Xink Link to comment Share on other sites More sharing options...
jlorenz1 Posted August 13, 2007 Share Posted August 13, 2007 Sorry, no idea what you mean.Tried your example. It works fine- What do you mean with sunken menues? Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post] Link to comment Share on other sites More sharing options...
Xink Posted August 14, 2007 Author Share Posted August 14, 2007 Sorry, no idea what you mean.Tried your example. It works fine- What do you mean with sunken menues?Hi jlorenz1,I mean, the menubar GUI is (sunken) lower then the GUI below with the 2 button.Is it possible to set the menubar the same thickness as the GUI below?Xink Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now