Andy007 Posted October 24, 2008 Posted October 24, 2008 Hi All, I have created a context menu and noticed that there are placeholders for icons... How would one go about either setting the icon to something or removing the icon placeholder altogether? Any help is appreciated. Regards,Andy (no, the other one)
rover Posted October 24, 2008 Posted October 24, 2008 Hi All, I have created a context menu and noticed that there are placeholders for icons... How would one go about either setting the icon to something or removing the icon placeholder altogether? Any help is appreciated.@Andy007 Rasim answered with one of my recommendations here's the other. to remove the reserved space: from help file GuiMenu Management section _GUICtrlMenu_SetMenuStyle($hFile, $MNS_NOCHECK) - No space is reserved to the left of an item for a check mark #include <GUIConstantsEx.au3> #include <GuiMenu.au3> Opt('MustDeclareVars', 1) Global $filemenu, $contextmenu, $newsubmenu, $msg ;right click on gui to bring up context Menu. GUICreate("My GUI Context Menu", 300, 200) $filemenu = GUICtrlCreateMenu("&File") _GUICtrlMenu_SetMenuStyle(GUICtrlGetHandle($filemenu), $MNS_NOCHECK) GUICtrlCreateMenuItem("Open", $filemenu) GUICtrlCreateMenuItem("Save", $filemenu) GUICtrlCreateMenuItem("Exit", $filemenu) $contextmenu = GUICtrlCreateContextMenu() _GUICtrlMenu_SetMenuStyle(GUICtrlGetHandle($contextmenu), $MNS_NOCHECK) GUICtrlCreateMenuItem("Open", $contextmenu) GUICtrlCreateMenuItem("Save", $contextmenu) GUICtrlCreateMenuItem("Exit", $contextmenu) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Exit I see fascists...
Andy007 Posted October 24, 2008 Author Posted October 24, 2008 Thanks rasim. Thanks rover - the example was great. I know it would have taken me ages to find that. Regards,Andy (no, the other one)
Deito Posted March 2, 2011 Posted March 2, 2011 Hi. Whow apply _GUICtrlMenu_SetMenuStyle($hFile, $MNS_NOCHECK) for a traymenu?
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