home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 February
/
PCWorld_2006-02_cd.bin
/
software
/
vyzkuste
/
triky
/
triky.exe
/
autoit-v3-setup.exe
/
Examples
/
GUICtrlCreateContextMenu.au3
< prev
next >
Wrap
Text File
|
2004-12-04
|
783b
|
29 lines
#include <GUIConstants.au3>
GUICreate("My GUI Context Menu",300,200)
$contextmenu = GUICtrlCreateContextMenu ()
$button = GUICtrlCreateButton("OK",100,100,70,20)
$buttoncontext = GUICtrlCreateContextMenu($button)
$buttonitem = GUICtrlCreateMenuitem("About button",$buttoncontext)
$newsubmenu = GUICtrlCreateMenu ("new", $contextmenu)
$textitem = GUICtrlCreateMenuitem ("text",$newsubmenu)
$fileitem = GUICtrlCreateMenuitem ("Open",$contextmenu)
$saveitem = GUICtrlCreateMenuitem ("Save",$contextmenu)
GUICtrlCreateMenuitem ("",$contextmenu) ; separator
$infoitem = GUICtrlCreateMenuitem ("Info",$contextmenu)
GUISetState ()
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend