I have a situation where I want something to be displayed when a user clicks on something in my UI (can be a grid, label, whatever). What I want is for a little box to be displayed that’s similar to what’s shown when a hover event is triggered. However, I only want to show it on a click, not a hover. Is there a way to do this without a lot of trouble? I know I could always create a little pop up Window but the hover text is exactly what I need and handles the location of the popup intelligently (which I think would take a good deal more work using a Window).
Share
I don’t think there’s a simple way to do this. Here’s the smart popup class we use:
Once you have a class like that, you could extend it to have your tool-tip styles, automatically include a label, etc…
And then, from there your code will be pretty simple:
I love writing classes so much that I’d probably even make a special subclass of
ClickHandlerso I didn’t have to type those lines over and over again…