Lemures Posted May 3, 2007 Posted May 3, 2007 Ok. This has got to be a very dumb question, I know, but how do I determine what item was clicked on a list? Why can't I find this in the help?
Generator Posted May 3, 2007 Posted May 3, 2007 Ok. This has got to be a very dumb question, I know, but how do I determine what item was clicked on a list? Why can't I find this in the help? You can use GUIReadData() if you have a button to do something, if not I guess you will have to pull a loop.
Valuater Posted May 3, 2007 Posted May 3, 2007 Ok. This has got to be a very dumb question, I know, but how do I determine what item was clicked on a list? Why can't I find this in the help? Wow... member # 150 for December 03 but don't know how to catch an event of a list??? maybe, like this... #include <GUIConstants.au3> GLOBAL $MESSAGE = "The following buttons have been clicked" GUICreate("My GUI list") ; will create a dialog box that when displayed is centered $add=GUICtrlCreateButton ("Add", 64,32,75,25) $clear=GUICtrlCreateButton ("Clear", 64,72,75,25) $mylist=GUICtrlCreateList ("buttons that have been clicked", 176,32,121,97) GUICtrlSetLimit(-1,200) ; to limit horizontal scrolling GUICtrlSetData(-1,$MESSAGE) $close=GUICtrlCreateButton ("my closing button", 64,160,175,25) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select case $msg = $add GUICtrlSetData($mylist,"You clicked button No1|") case $msg = $clear GUICtrlSetData($mylist,"") Case $msg = $mylist MsgBox(0x0,"read list", guictrlread($mylist), 2) Case $msg = $close MsgBox(0,"", "the closing button has been clicked",2) Exit EndSelect Wend 8)
Valuater Posted May 3, 2007 Posted May 3, 2007 Good example. How do we catch a doubleclick on a list?learn to use the search buttonhere is one that has many styles by many good scriptershttp://www.autoitscript.com/forum/index.ph...ost&p=345498)
GaryFrost Posted May 3, 2007 Posted May 3, 2007 http://www.autoitscript.com/forum/index.ph...st&p=275537 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Geert Posted May 3, 2007 Posted May 3, 2007 http://www.autoitscript.com/forum/index.ph...st&p=275537Thanks Gary, I already used your Listview version, but could not get it working for List. This example helps me out!
Lemures Posted May 3, 2007 Author Posted May 3, 2007 Holy crap, never even realized I was member #150, lol. 03 puts me back in... 7-3=4 high school? maybe? i dont know. It was a while ago. I just in the past few months started working with GUI's. Give me a break And thanks for the great answers!
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