O'Reilly logo

ExtGWT Rich Internet Application Cookbook by Odili Charles Opute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating on/off toggle buttons

Standard buttons do not have the ability to represent and communicate state, apart from the enabled/disabled state of course. Users often want to be able to turn on/off (toggle) a feature (for example, expand/collapse a tree-like structure) with the push of one button, not two separate buttons for the on/off states, but one button that can visually give cues whether the feature is switched on or switched off. I almost named this recipe "Contextual switching" but realized it would make me sound like medical pros who are often good in saving life but so bad in naming thing (consider osteoporosis), so I thought again.

How to do it...

Contextual switching (well you can't nail me now, after all I've explained it) in GXT ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required