Tooltip question
-
I have a 2 state button and I want to have a different tooltip based on the state. I am using the method
Label1.setTooltip();
in a function that looks like this
inline function onLabel1Control(component, value) { if (value == 1) { Label1.setTooltip("1"); } else { Label1.setTooltip("2"); } }; Content.getComponent("Label1").setControlCallback(onLabel1Control);
The tooltip change only registers if I press compile after toggling the state of the button. How do I get it to register without having to do that?
-
@TNTHM
Do you have a snip to share? That makes tinkering easier.Maybe the changed() function?
if (value == 1) { Label1.setTooltip("1"); } else { Label1.setTooltip("2"); } Label1.changed();
-
@TNTHM Why are you changing it in the label callback and not the button callback?