cyjianhang 发表于 2013-4-25 13:10:27

list列表怎么样才能实现右键创建ContextMenu

如题,希望能有人帮下

鸟人 发表于 2013-4-25 13:31:45


#include <GUIConstantsEx.au3>

Local $add, $clear, $mylist, $close, $msg
Local $MESSAGE = "The following buttons have been clicked"

GUICreate("My GUI list") ; will create a dialog box that when displayed is centered

$mylist = GUICtrlCreateList("buttons that have been clicked", 10, 32, 350, 97)
GUICtrlSetLimit(-1, 200) ; to limit horizontal scrolling
GUICtrlSetData(-1, $MESSAGE)
Local $buttoncontext = GUICtrlCreateContextMenu($mylist)
GUICtrlCreateMenuItem("About button", $buttoncontext)
GUICtrlCreateMenuItem("About button1", $buttoncontext)
GUICtrlCreateMenuItem("About button2", $buttoncontext)
GUICtrlCreateMenuItem("About button3", $buttoncontext)


GUISetState()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
        $msg = GUIGetMsg()
WEnd

cyjianhang 发表于 2013-4-25 13:35:57

谢谢,问题解决了

一辈子为你 发表于 2013-4-25 23:18:53

太牛了呵呵 不错 需要这个
页: [1]
查看完整版本: list列表怎么样才能实现右键创建ContextMenu