Re: How to not allow users to select something, say a grid?

2010-06-06 Thread Stephen Haberman
I use this css hack:

.notclickable { cursor: default; user-select: none; -moz-user-select:
none; -webkit-user-select: none; }

Not sure where user-select is/is not supported, but it works in the
browsers I personally use. :-)

- Stephen

-- 
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-tool...@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.



Re: How to not allow users to select something, say a grid?

2010-06-06 Thread Stefan Bachert
Hi,

the general way to get rid of unwanted events is to eat them.
Make an handler and if needed say this events has been handled.

In your situation to change Event.sinkEvents may help.
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/Event.html

But aware, a selection may start outside of your grid.

Stefan Bachert
http://gwtworld.de


On 6 Jun., 06:20, spierce7 spier...@gmail.com wrote:
 I've got a Grid with click handlers inside of an Absolute Panel. When
 I'm clicking the grid to trigger some of the events, particularly with
 drag events, I've noticed that different parts of my grid are selected/
 highlighted. Is there a way to control this and turn this off for
 different widgets? I'd also like to be able to do this with my labels.

-- 
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-tool...@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.



How to not allow users to select something, say a grid?

2010-06-05 Thread spierce7
I've got a Grid with click handlers inside of an Absolute Panel. When
I'm clicking the grid to trigger some of the events, particularly with
drag events, I've noticed that different parts of my grid are selected/
highlighted. Is there a way to control this and turn this off for
different widgets? I'd also like to be able to do this with my labels.

-- 
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-tool...@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.