I was wondering if it is interesting for anyone to have the option to be able to show a tooltip when the user hovers the mouse pointer over the top of a shape?
I am interested in this as a new feature and welcome any thoughts or suggestions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
// NOTE: On GTK, setting and unsetting the tooltip works well, however on Windows, the tooltip is not shown
// until it is set AND THEN the mouse is moved. Therefore, for Windows at least, it is necessary to show and
// hide by changing the text.
if (GetToolTip())
{
// If the tooltip isn't being shown (text blank), reset the timer.
if (GetToolTipText() == "")
m_HoverTimer.Start (500, wxTIMER_ONE_SHOT);
// Otherwise, if the tip is shown and the cursor is no longer over a shape, clear the text.
else if (!GetShapeUnderCursor())
GetToolTip()->SetTip ("");
}
Hi,
I was wondering if it is interesting for anyone to have the option to be able to show a tooltip when the user hovers the mouse pointer over the top of a shape?
I am interested in this as a new feature and welcome any thoughts or suggestions.
It turns out that this is very simple and very effective.
In the ctor for wxSFShapeCanvas (or its derivative) add the following:
Then in the ::OnMouseMove method:
Finally the hover timer event handler:
Of course this needs a corresponding modification to wxSFShapeBase to include a tip text getters and setters.