Reinier,
Thanks for the help. I've been also thinking of creating my own
images and then just using ToglleButton.
Bear
On Sep 19, 2008, at 4:50 PM, Reinier Zwitserloot wrote:
That's not how stylesheets work.
You have two options:
A) change the style of a given element. e.g. use add/removeStyleName,
to change the styling info of your widget. for example:
myWidget.setStyleName(someStyleClassThatIsAlwaysApplied);
if ( toggledOn ) {
myWidget.removeStyleName(toggledOn);
myWidget.addStyleName(toggledOff);
} else { /* you can guess what goes here */ }
B) Have two widgets, one for each 'toggle', and alternatively hide/
show them. Use the widget's .setVisibility(bool) method to do it.
On Sep 20, 12:10 am, Bear [EMAIL PROTECTED] wrote:
Can anyone help me implement iPhone style toogleswitch in GWT? I've
been trying to use the iUi CSS style sheets and I have a question on
how I would implement this in GWT?
fieldset
div class=row
labelShuffle/label
div class=toggle onclick= toggled=truespan
class=thumb/spanspan class=toggleOnON/spanspan
class=toggleOffOFF/span/div
/div
fieldset
I assume I can use a HorizontalPanel and setStyleName(row) and then
add a button with style toggle but how do I send the toggled=true
info to the CSS and add the 3 span elements?
Thanks in advance
Bear
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---