How to permanently change text of ToggleButton?

2013-02-26 Thread membersound
Changing the text of togglebutton only appears on hover. Is this correct? g:ToggleButton text=test / @UiHandler(toggleButton) onToggle(ClickEvent evt) { if (toggleButton.isDown()) { toggleButton.setText(is down); } else { toggleButton.setText(is up); } } Result: I only see

Re: How to permanently change text of ToggleButton?

2013-02-26 Thread Jens
ToggleButton is a CustomButton and has so called Faces and setText() only changes the text of the current Face. In a click handler the current Face can probably only be UP_HOVERING and DOWN_HOVERING and you have changed the text of one or both of them. So all the faces can have different text

Re: How to permanently change text of ToggleButton?

2013-02-26 Thread Kody
Ok good hint. Setting text for both up and down face works as expected. 2013/2/26 Jens jens.nehlme...@gmail.com ToggleButton is a CustomButton and has so called Faces and setText() only changes the text of the current Face. In a click handler the current Face can probably only be UP_HOVERING