I would like to understand why canSelectText is false by default. Wouldn't I want to be able to select all text just like with regular web applications? Is there a way to enable this globally?
Announcement
Collapse
No announcement yet.
X
-
Yes. Look at the static functions available for almost all the widgets. There are functions for setting new global defaults that will be applied to any widgets created after the call.
For Example:
Code:ListGrid defaultGrid = new ListGrid(); defaultGrid.setCellHeight(35); ListGrid.setDefaultProperties(defaultGrid);
Last edited by amcculley; 13 Dec 2012, 08:14.
-
Originally posted by Isomorphic View PostDrag selecting text is mutually exclusive with any other drag operation, so this is not a good property to flip on globally - you will break all drag behaviors.
Your mileage may vary but I suspect that in general one has a lot more widgets that are /not/ draggable than ones that are. So, wouldn't it generally mean a lot less code i.e. work to disable drag-select on those?
Comment
-
No. If you use setDefaultProperties you are really setting something system-wide, even for AutoChildren and internal components, which means you will have a bunch of work ahead of you trying to revert the canDragSelect setting for draggable things like the Window corner resizer, each individual header button in a ListGrid, etc.
Comment
-
Good point.
For us, nothing is dragged or resized so I've never seen it an issue but I can see how it could be for "out of the box" apps using SmartGwt.
As a UX director, I find things like resize corners, resize bars, etc to be crutches for not really understanding what the users of an app want or need. We invest quite a bit of time and energy in understanding and customizing solutions for our users.
That being said, there are several places where it makes sense. i.e. Creating an ad-hoc reporting / dashboard system, generic data interface, etc.
Comment
Comment