I think it can't know... but you can have a method that asks the user which one he's using... for example:
MyWidgetLibrary.setTheme(anyTheme); and that should change the styleName of the widget :) On Mar 15, 11:08 am, Riyaz Mansoor <[email protected]> wrote: > How would I do this without a - say - ListBox? > > My widget is being used in another application and that user might > choose to do it in Standard, Dart or other theme. How can my widget > know what theme is being used and to apply the respective styles? > > On Mar 12, 4:36 pm, Sean <[email protected]> wrote: > > > Sure, have a listener attached to a drop down box or menu or a button, > > some way for the user to select the theme. And on select > > use .removeStyleName(style) to remove the old style and .addStyleName > > (style) to add the new style name. If this is the only style you have > > applied to the Widget you could just use .setStyleName(style) to > > remove the old ones and use this new style. > > > On Mar 11, 11:44 pm, Riyaz Mansoor <[email protected]> wrote: > > > > Have widget that I have stylized using CSS. But I have no idea how to > > > theme this widget. I want some CSS differences to be seen by the user, > > > when different themes are selected. > > > > Can this be done? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
