Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / BlueGUI question

Author
Message
Monzi
19
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 23rd Apr 2005 19:35
How do i check if a toolbarbutton has been clicked?
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd Apr 2005 22:58
1. Check for a click event, the same way as other gadgets. (Check for a MOUSE_CLICK event)

2. Use getToolbarItem to find out which button was pressed.

See the Rainbow source code for an example.


BlueGUI Windows Plugin
Monzi
19
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 25th Apr 2005 07:38 Edited at: 25th Apr 2005 07:43
I'm not sure i understand it

Cant find any getGadgetClicked or something like that (btw rob you need to update your documentation, found a few faults so far in the F1-documentation).

But in general i dont know how to check if a button has been clicked other than mouseovergadget + mouseclick() ... but that cant be the only way, can it? Checked the helpfile 100 times now, cant find anything about it there.
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 25th Apr 2005 08:29 Edited at: 25th Apr 2005 08:30
Hi Monzi,

You need to read the guide / intro doc that comes with BlueGUI. It is also available on the website. That explains the event system used to detect input.

Quote: "(btw rob you need to update your documentation, found a few faults so far in the F1-documentation)."


Post any doc faults on the BlueGUI bug report page.


BlueGUI Windows Plugin
Monzi
19
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 26th Apr 2005 03:23
found this out:

if eventSource()=Toolbar and eventType()=MOUSE_CLICK
EndIf

but thats just clicking on the toolbar, how do i specify which button has been clicked?
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 26th Apr 2005 03:57
Inside that if statement, use getToolbarItem.

Quote: "
if eventSource()=Toolbar and eventType()=MOUSE_CLICK
message "You clicked item #"+str$(getToolBarItem(Toolbar))
EndIf
"



BlueGUI Windows Plugin
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 26th Apr 2005 03:57
Inside that if statement, use getToolbarItem.




BlueGUI Windows Plugin
Monzi
19
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 26th Apr 2005 05:10 Edited at: 26th Apr 2005 05:10
In other words:



(if the first item has been clicked)

Login to post a reply

Server time is: 2024-04-25 13:07:39
Your offset time is: 2024-04-25 13:07:39