hi can anyone help me in this it should only highlight / text
selection only on HTML widget only

On Sep 29, 8:16 pm, Charan <[EMAIL PROTECTED]> wrote:
> hi,
>
> I have disabled the default mouseEvents of browser by using the
> following code
>
> DOM.addEventPreview(new EventPreview()
>                 {
>                         public boolean onEventPreview(Event event)
>                         {
>                                 switch (DOM.eventGetType(event))
>                                 {
>                                 case Event.ONMOUSEDOWN:
>                                 case Event.ONMOUSEMOVE:
>                                 case Event.ONMOUSEUP:
>                                         DOM.eventPreventDefault(event);
>                                 }
>                                 return true;
>                         }
>                 });
>
> I have a several widgets in a FlexTable, one of widget is HTML widget
> (in ScrollPanel) which displays static html data in it.
> Now i need to enable text selection only on this HTML widget not all
> widgets on browser.
>
> i tried some ways which are enabling on the whole browser widgets.
> This code enables for all browser
> DOM.addEventPreview(new EventPreview()
>                 {
>                         public boolean onEventPreview(Event event)
>                         {
>                                 switch (DOM.eventGetType(event))
>                                 {
>                                         case Event.ONMOUSEDOWN:
>                                         case Event.ONMOUSEMOVE:
>                                         case Event.ONMOUSEUP:
>                                                 
> //DOM.eventCancelBubble(event, true);
>                                                 
> //DOM.eventGetToElement(event);
>                                                 
> //disableTextSelect(getBodyElement(), false);
>                                                 
> //DOM.setElementProperty(getBodyElement(), "onselectstart",
> "null");
>                                 }
>
>                                 return true;
>                         }
>                 });
>
> My requirement is to enable only for HTML widget.
>
> Thanks in advance
> Regards,
> S.charan Kumar
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to