08-15-2014 03:29 PM
Hello all,
I have a simple feature of my code I am working on. I want to have a detailed help box ( a little more detailed than the tooltip popup option) with instructions I want to print on my screen.
The idea is that when I have an active control, the instructions will print in a small text box to give people guidance on my program.
This works for half of what I want to do.
But in the case of a custom toolbar, I do not have that ability since I cannot click inside of it like a textbox.
I am using the tooltip, but I would like to be able to print a better, more detailed message in my help box.
Ideally what I would like to know if there is a function to be able to get which control is being highlighted or hovered over by panel and control id.
It's no big deal if there isn't one, but now I am curious.
08-16-2014 12:00 AM
Hi,
if EVENT_GOT_FOCUS is not suitable for you another possibility could be to use a timer callback, and for every timer tick call GetRelativeMouseState (panel, 0, &x_coordinate, &y_coordinate, NULL, NULL, NULL); this will return the current position of the mouse cursor on the panel. To make use of it, at the beginning of your program you need to obtain the positions of your UI controls, e.g. using GetCtrlBoundingRect ( panel, control, &button.top, &button.left, &button.height, &button.width ). Then you need to check if the mouse is within a bounding box by comparing the mouse coordinate with the control coordinate...
But why are the tooltips not working for you?
08-18-2014 09:04 AM
Sounds interesting. I shall try the Event Got Focus first and go from there.
It's not the tooltips aren't working. They work fine. I just, visually, want all my help details in a help box on my GUI. Its preferential is all.
08-18-2014 11:58 AM
There is also an EVENT_MOUSE_POINTER_MOVE event.
Focus events need a click to occur.
Move event is fired when mouse pointer is over a control.
But since it is not displayed in the UIR editor in Operate mode, I cannot tell if it works for menus or not.