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

Building a better slider field

The GXT SliderField is beautiful and fun to use, it is passed a Slider and adapts it as an input widget for FormPanel. There is, however, one twist to its API that I think inhibits its use and it's the fact the you have very little control over the formatting of the tooltip message shown as you drag the slider's thumb back and forth.

As of GXT 2.2.3 you can only configure the tip message by setting a single string (one size fits all) with the slider.setMessage() method call; for example, slider.setMessage("{0} inches tall"). With this setup, you get the tooltip formatted like "1 inches tall", "2 inches tall", "3 inches tall", and so on. Internally, Slider uses Format.substitute(getMessage(), value) such that the ...

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