Well, there's always some work-around, but GWT is supposed to help us from those.
2010/6/19 André Moraes <[email protected]> > It's more like a workaround, but you could: > > - Remove the ClickHandlers for the widget (easy if the widget is > private under a composite) > - use addStyleName, removeStyleName to set the css class of the > disabled widgets. > > Using the Composite base class if very nice and you can use all the > widget power and just display the interface that your custom widget > need. > I usually make all my app-wide components (menus, toolbars, status > bar, etc...) be inside a custom widget so I can change many aspects of > the look/behavior of the component without worrying about breaking the > interface of the component > > > http://code.google.com/intl/webtoolkit/webtoolkit/doc/latest/DevGuideUiCustomWidgets.html > > This workaround will be ok for the menus and labels you pointed. > > On 19 jun, 11:52, Jaroslav Záruba <[email protected]> wrote: > > I do agree, Stefan. It should be made clear what exactly does 'disabled' > > mean for a Widget. Should disabled Widget 'ignore' click events > completely? > > > > On Sat, Jun 19, 2010 at 4:33 PM, Stefan Bachert <[email protected] > >wrote: > > > > > > > > > Hi, > > > > > that is true. However, in any good gui you need sometimes to disable a > > > label or a menu-item, too. > > > Supplying FocusWidget with as enabling/disabling method is just too > > > less. The cause is that <input> has an html-attribute called > > > "disabled". > > > > > The current widget api of GWT is too short sighted. > > > It is driven by what is offered by the html tag rather than what is > > > needed by the gui-developers. > > > > > Stefan Bachert > > >http://gwtworld.de > > > > > On Jun 18, 5:09 pm, Trevor Skaife <[email protected]> wrote: > > > > The setEnabled method is in the FocusWidget which I'm assuming all of > > > > your input widgets extend. So just cast all of the widgets in your > > > > form to a FocusWidget and then you can enable/disable them. > > > > > > Trevor > > > > > > On Jun 18, 9:38 am, Stefan Bachert <[email protected]> wrote:> > Hi > > > Magnus, > > > > > > > I agree with you, there should be such a method at UiObject, but > > > > > actually it it not. > > > > > You may write an enhancement request > > > > > > > Stefan Bacherthttp://gwtworld.de > > > > > > > On Jun 17, 7:27 pm, Magnus <[email protected]> wrote: > > > > > > > > Hi, > > > > > > > > how can I enable/disable a widget (TextBox, Button, etc.)? > > > > > > > > I would like to iterate all Widgets of a form and set this > status. I > > > > > > found no appropriate methods in the Widget class... > > > > > > > > Magnus > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google Web Toolkit" group. > > > To post to this group, send email to > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-web-toolkit%[email protected]><google-web-toolkit%2Bunsubs > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-web-toolkit?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. 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.
