jaxim
7 years agoVisitor
Button to Listen to Focus Event?
I've created a custom component that extends the button class. I would like to listen to a Focus event within the custom component so I can tell the UI nodes to display differently when the component is in focus. I've tried to listen to the focusPercent field within component's interface like below but the eventhandler is never called.
How do I get this custom component/button to listen to the focus event so I can have it react to getting into and out of focus?
p.s. This is how I am setting the button into focus: button.setFocus(true)
<field id="focusPercent" type="float" onChange="itemFocusChanged"/>
How do I get this custom component/button to listen to the focus event so I can have it react to getting into and out of focus?
p.s. This is how I am setting the button into focus: button.setFocus(true)