or you can simply stop creating new Image() and use element.getStyle().setBackgroundImage() instead. much cleaner this way.
On Mon, Jun 7, 2010 at 7:10 PM, Erik M. <[email protected]> wrote: > Thanks foir your ideas, I'll give them a try tonight! > > On Jun 4, 8:33 pm, fmod <[email protected]> wrote: > > Hi > > > > Use <div style='background: url("image.png");"> GWT can help you > > writing this code. > http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.htm... > > > > Other option is to try to prevent the browser for taking the default > > action. (I did not try myself) > > > > image.addClickHandler(new ClickHandler() { > > public void onClick(ClickEvent event) { > > event.preventDefault(); > > } > > > > }); > > > > Regards > > -Fran > > > > On Jun 4, 10:51 am, "Erik M." <[email protected]> wrote: > > > > > Hi, > > > > > I've got several Image Widgets on my Site. Is there a way to prevent > > > theselectionwith the mouse?Selectionof an image means its getting > > > a blue background and being draggable to other windows. > > > Can you think of an HTML or GWT solution? > > > > > I read that one option was to add an mouseMove event handler and let > > > it "return false;". This was a pure JavaScript solution, not related > > > to GWT. > > > > > Sincerely, > > > Erik > > -- > 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.
