OK but the text should be naturally layed out. And using horisontal panel will make the text in one line only :) On Thu, Mar 4, 2010 at 6:41 PM, Eric <[email protected]> wrote:
> > > On Mar 4, 10:38 am, Thomas Broyer <[email protected]> wrote: > > @mariyan: use an HTML widget and markup your words (using e.g. > > <span>Google</span>), then in your ClickHandler, you can query the > > NativeEvent and from it the actual event's target. If the target > > element's tag name is "span" (preferably case insensitive) then you > > can look at its content or some attributes or... (if you need "custom > > attributes", I suggest using the data-* prefix as "suggested" by > > HTML5, e.g. <span data-word="google">Google</span> and then in your > > code: elt.getAttribute("data-word")) > > Or, to avoid querying the source of the event, > > HorizontalPanel panel = new HorizontalPanel(); > InlineLabel red = new InlineLabel("red"); > InlineLabel green = new InlineLabel("green"); > InlinLabel blue = new InlineLabel("blue"); > red.addClickHandler(...); > blue.addClickHandler(...); > panel.add(red); > panel.add(green); > panel.add(blue); > > Eric > > -- > 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.
