Double Click
BlitzMax Forums/BlitzMax Programming/Double Click
| ||
When using EVENT_GADGETACTION it's already triggered when a gadget is clicked just once. Now I need something that will trigger some value or anything when a gadget is double-clicked. I've been digging through the Blitz documentation for months now, and apparantly such a thing is unneeded to note, since not one single word is written about it anyway. Since the Navigation bar of the IDE uses it (and since it's written in BlitzMax) I know it must be possible. But spitting out the source code did not give me any valuable leads. One of the most important features within any GUI based system is nowhere to be found. Am I such an idiot, or did they really see no need for a simple and well documented feature for that? If you guys can help me out, please tell me! |
| ||
Are you up to date with syncmods? I get GadgetAction when I double-click. See this This should take a double-click... SuperStrict Local MyWindow:TGadget=CreateWindow("ListBox Example", 200,200,320,240) Local ListBox:TGadget=CreateListBox(10,10,200,100,MyWindow) For Local i:Int=1000 To 1050 AddGadgetItem ListBox,i Next Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_GADGETACTION Local i:Int=SelectedGadgetItem(listbox) InsertGadgetItem ListBox, i, "Inserted Item" End Select Forever Here's somebody that wants it changed back |
| ||
in this thread http://www.blitzmax.com/Community/posts.php?topic=56784#631362 skid wrote: EVENT_GADGETSELECT when a selection changes (single left click) EVENT_GADGETACTION when you double left click EVENT_GADGETMENU when the user uses the right button make sure you have the latest syncmods, works with listboxes (except right-click) and treeviews example SuperStrict Local MyWindow:TGadget=CreateWindow("TreeView Example", 40,40,400,400) Global MyTreeView:TGadget=CreateTreeView(5,0,200,360,MyWindow) Local Folder:Int=ReadDir(BlitzMaxPath()) Local File:String Repeat File=NextFile(Folder) AddTreeViewNode(file,MyTreeView) Until File=Null Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_GADGETACTION Print "Double Click" Case EVENT_GADGETSELECT Print "Single Click" Case EVENT_GADGETMENU Print "Right Click" End Select Forever End |
| ||
I guess I'm not fully up to date with my syncmods then... But since my update to V1.20 went wrong a few times, I did not have the time to get that right. Thanks a lot guys. |
| ||
And what must I do when I just want to check the doubleClick system event-flag in BlitzMax (no Gadget-stuff). If getDoubleClick() then ... Does anyone know how to write the getDoubleClick() function? |
| ||
Or.. how to check for doubleclicks on a canvas? (other than using a timer and check for two single mousedowns) |