Page 1 of 1

[Solved] Tooltip feature request

Posted: Fri Nov 10, 2017 8:48 pm
by howardantares
We have several situations where it would be nice to be able to change a control or view's tooltip on the fly. For example, if a control is disabled due to some sate of the plug-in, we'd like to state why that control is disabled and how to re-enable it. Or if a button changes the action it will take when pressed depending upon some plug-in state.

Currently, vstgui does not allow controls to change their tooltips (which we define in the uidescription file). So, for controls that we want to have show a different tooltip when disabled, we have to show a transparent view over the control that has the disabled version of the tooltip.

It would be nice (and more object-oriented) if the tooltip system *asked* the current control what its tooltip is, via a virtual function getTooltip(). That would allow controls and views to return whatever tooltip is appropriate for the moment, not just one generic tooltip.

Just a suggestion...

Re: Tooltip feature request

Posted: Sat Nov 11, 2017 3:11 pm
by Arne Scheffler
You can already update the tooltip of a view :

Code: Select all

std::string text = "example tooltip";
view->setAttribute (kCViewTooltipAttribute, text.size ()+1, ());

Re: Tooltip feature request

Posted: Mon Nov 20, 2017 4:29 pm
by howardantares
Oh, excellent! Thanks, Arne!