Jump to content
Neil Pate

Ring Control: event for the current value?

Recommended Posts

I am struggling with this user interaction I would have thought would be easy to solve.

My GUI has a ring control populated with some values (a list of recent files). Does anybody know how to handle the situation where they click the same item as is currently selected? I cannot figure out a way to handle this sensibly.

Perhaps it would be better to use some other control class? I have been asked to implement this as a drop-down type control (which is quite customised cosmetically).

Edited by Neil Pate

Share this post


Link to post
Share on other sites

What's wrong with using the Mouse Down? filter event to detect a click?

Share this post


Link to post
Share on other sites

Mouse down only fires off the first time you click on it, not when the activation menu item is clicked.

Edited by Neil Pate

Share this post


Link to post
Share on other sites

Now I'm intrigued. I want to play to discover, but I might not get to a PC for a while, so apologies if it takes me a little while to reply.

Share this post


Link to post
Share on other sites

I tried Mouse up, and discovered that it works only if you choose the last element and move the pointer out of the popup window but still at the edge of the bevel. Curious to know too.

Share this post


Link to post
Share on other sites

I have spent a good few hours already trying many things. About the closest I got to something workable is to dynamically invoke the short-cut menu on a left-click. Actually that works quite nicely except the menu is positioned at the cursor which looks a bit weird and also uses the OS font rather than the font and size of my GUI.

Edited by Neil Pate

Share this post


Link to post
Share on other sites

Yeah, playing with this I can see that there's no native way to gracefully handle this.

There are tools out there for creating custom popup menus, you can use one of these to generate a dynamic menu that appears beneath the ring control, just as the native control would?

Share this post


Link to post
Share on other sites
4 hours ago, pawhan11 said:

Seems that combo box always creates value change event :D

Looks like I may be able to get this to work. I need to be able to customise the control so the the button spans the whole of the text to allow you to click anywhere on it.

:thumbup1:

Edit: works well, thanks!

Edited by Neil Pate

Share this post


Link to post
Share on other sites

I used another mouse down event case and wired a value of -1 to the ring control, so the same value selected also triggers a value change event.

test.png

Edited by lbains
missed value of "-1"

Share this post


Link to post
Share on other sites

That does work except for the situation where the user changes their mind and moves the mouse out of the popup and releases, then the value of -1 persists.

Share this post


Link to post
Share on other sites

There's a private 'Operate Menu Dismissed' event that may help in this situation.

1.png

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.