Hi. I'm new to GWT and trying to get an idea of best practise relating
to custom widgets and styles. I've seen some related posts but not
ones that quite answer my question.

So, suppose I make a new widget extending Composite containing two
buttons in a panel (this is a bit of an artificial example). Suppose I
want different styles for the containing panel, and each of the
buttons. I set the primary style name of the panel to say, myProject-
myWidget and the buttons to myProject-myWidgetButtonOne and myProject-
myWidgetButtonTwo respectively. Is this reasonable so far?

Now, I want two different instances of myWidget with different styles.
So, I expect to be able to call setStylePrimaryName on the myWidget
instances and then have sets of css classes for each of my instances.
As it stands, calling setStylePrimaryName on myWidget won't (I think)
get pushed down to the children (or at least I don't see how it
could). Is it my responsibility to override setStylePrimaryName in
myWidget to push this change down to the children? I've seen in the
source of MenuBar something similar where new popups are given the
class getPrimaryStyleName()+"Popup" or something. So, I guess the
question is do I have the right end of the stick or have I missed
something.

Cheers,

Matthew

--~--~---------~--~----~------------~-------~--~----~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to