Tuesday, February 26, 2013

Re: How to permanently change text of ToggleButton?

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 assigned. To customize each text you can call the appropriate getter for a given face and customize it or you set your own Face for a given state using the corresponding setter method.

See CustomButton source code / JavaDoc for details.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment