If you want to have mouse over effect, you should use sinkEvents instead of
ClickListener. You can sink extra event ONMOUSEOVER and change Label style
attribute when onBrowserEvent gets called.

Best
Kevin

On Mon, Dec 15, 2008 at 11:43 PM, Smith <smitha.kang...@gmail.com> wrote:

>
> Thanks, Kevin. How about  myLabel.addClickListener(ClickListener
> listener)  ?
>
> Also,is there a  disadvantage with making labels clickable? The user
> wouldn't know if that text is clickable unless you mention that
> explicitly. I mean if you bring the mouse over it, would it give any
> indication that it's clickable?
>
> Thanks,
>
>
> On Dec 15, 7:20 am, "Kevin Tarn" <kevn.t...@gmail.com> wrote:
> > You can inherit Label and sink ONCLICK event by add below line in
> > constructor of inherited class.
> >
> > void InheritLabelConstructor(String text) {
> >     super(text);
> >     sinkEvents(Event.ONCLICK);
> >
> > }
> >
> > void onBrowserEvent(Event event) {
> >     super.onBrowserEvent(event);
> >     if (event.getTypeInt() == Event.ONCLICK) {
> >          // do something
> >     }
> >
> > }
> >
> > Best
> > Kevin
> >
> > On Mon, Dec 15, 2008 at 11:07 PM, Smith <smitha.kang...@gmail.com>
> wrote:
> >
> > > All,
> >
> > > Is there a way to add some clickable text into a panel? I am aware of
> > > Hyperlink, but I don't need history support. All I need is to show
> > > another panel when a text is clicked on.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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