Sign in to follow this  
Followers 0
Just_Plain_Cool

Two different clicks, two different results?

3 posts in this topic

#1 ·  Posted (edited)

Hi all...

I have written a script that has a tray icon. When the user clicks the icon, it toggles the state of minimization of the GUI. I also want to be able to have an exit item on a menu from the tray icon. I have code that will allow this, but the user now has to double click the icon to get it to toggle the app as the first click brings up the menu with the exit item.

Is it possible to have a primary button click on the tray icon toggle the app and a secondary button click bring up the menu?

Thanks for any help,

JPC :)

Edited by Just_Plain_Cool

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Yes.

TraySetClick

------------

Sets the clickmode of the tray icon - what mouseclicks will shown the tray menu

TraySetClick(8)
TraySetOnEvent($TRAY_EVENT_PRIMARYUP, 'ToggleWindow')
Edited by Saunders

Share this post


Link to post
Share on other sites

Yes.

TraySetClick(8)
TraySetOnEvent($TRAY_EVENT_PRIMARYUP, 'ToggleWindow')

<{POST_SNAPBACK}>

Thanks Saunders, sometimes the simple stuff stumps me! LOL

JPC :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0