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
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
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