Neil Pate Posted July 25, 2018 Report Share Posted July 25, 2018 (edited) 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 July 25, 2018 by Neil Pate Quote Link to comment
Thoric Posted July 25, 2018 Report Share Posted July 25, 2018 What's wrong with using the Mouse Down? filter event to detect a click? Quote Link to comment
Neil Pate Posted July 26, 2018 Author Report Share Posted July 26, 2018 (edited) Mouse down only fires off the first time you click on it, not when the activation menu item is clicked. Edited July 26, 2018 by Neil Pate Quote Link to comment
Thoric Posted July 26, 2018 Report Share Posted July 26, 2018 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. Quote Link to comment
ensegre Posted July 26, 2018 Report Share Posted July 26, 2018 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. Quote Link to comment
Neil Pate Posted July 26, 2018 Author Report Share Posted July 26, 2018 (edited) 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 July 26, 2018 by Neil Pate Quote Link to comment
pawhan11 Posted July 26, 2018 Report Share Posted July 26, 2018 Seems that combo box always creates value change event 1 Quote Link to comment
Thoric Posted July 26, 2018 Report Share Posted July 26, 2018 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? Quote Link to comment
Neil Pate Posted July 26, 2018 Author Report Share Posted July 26, 2018 (edited) 4 hours ago, pawhan11 said: Seems that combo box always creates value change event 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. Edit: works well, thanks! Edited July 26, 2018 by Neil Pate Quote Link to comment
infinitenothing Posted July 26, 2018 Report Share Posted July 26, 2018 If you make an idea on the exchange, I'll vote for it. Quote Link to comment
lbains Posted August 3, 2018 Report Share Posted August 3, 2018 (edited) 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. Edited August 3, 2018 by lbains missed value of "-1" Quote Link to comment
Neil Pate Posted August 4, 2018 Author Report Share Posted August 4, 2018 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. Quote Link to comment
lbains Posted August 7, 2018 Report Share Posted August 7, 2018 I realized it after posting that it wouldn't work Quote Link to comment
Darren Posted August 7, 2018 Report Share Posted August 7, 2018 There's a private 'Operate Menu Dismissed' event that may help in this situation. 2 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.