The following behaviour is seen when using Using SmartGWT version 2.5 08/02/2011 11:09 LGPL, for all browsers:
We have enabled drag text selection within a ListGrid via:
this.setCanDragReposition(false);
this.setCanDragResize(false);
this.setCanDragRecordsOut(false);
this.setCanDragSelect(false);
this.setCanReorderFields(false);
this.setCanReorderRecords(false);
this.setCanSelectText(true);
this.setCanDragSelectText(true);
this.setDragAppearance(DragAppearance.NONE);
This ListGrid runs almost the entire height of the page so it can be quite tall. We have found that when selecting text near the top and bottom of the ListGrid that as the user selects the text there is very fast scrolling up (if the text selection is near the top) or scrolling down (if the text selection is near the bottom). This scrolling is so fast that the user looses control over the text that is being selected and is unable to effectively complete this task.
Looking at the underlying SmartClient (ISC_Core.js) script I can see that if the user drag selects within a region that is 10% of the total height of the underlying Canvas at the top or bottom that this automatic scrolling will occur:
dragScrollThreshold:"10%"
and that the maximum scroll increment is 5%:
maxDragScrollIncrement:"5%"
Both of these are marked "@visibility internal" and I am unable to find any matching methods within SmartGWT (for example on Canvas.java) that would allow reducing these values to say 2% and 1% respectively which likely is more appropriate for our particular ListGrid.
Is there a supported/correct way of:
1. Reducing the region at the top/bottom of the ListGrid where this automatic scrolling starts
2. Reduce the rate at which the scrolling occurs when automatic scrolling is performed.
Thank you for any help/hints.
We have enabled drag text selection within a ListGrid via:
this.setCanDragReposition(false);
this.setCanDragResize(false);
this.setCanDragRecordsOut(false);
this.setCanDragSelect(false);
this.setCanReorderFields(false);
this.setCanReorderRecords(false);
this.setCanSelectText(true);
this.setCanDragSelectText(true);
this.setDragAppearance(DragAppearance.NONE);
This ListGrid runs almost the entire height of the page so it can be quite tall. We have found that when selecting text near the top and bottom of the ListGrid that as the user selects the text there is very fast scrolling up (if the text selection is near the top) or scrolling down (if the text selection is near the bottom). This scrolling is so fast that the user looses control over the text that is being selected and is unable to effectively complete this task.
Looking at the underlying SmartClient (ISC_Core.js) script I can see that if the user drag selects within a region that is 10% of the total height of the underlying Canvas at the top or bottom that this automatic scrolling will occur:
dragScrollThreshold:"10%"
and that the maximum scroll increment is 5%:
maxDragScrollIncrement:"5%"
Both of these are marked "@visibility internal" and I am unable to find any matching methods within SmartGWT (for example on Canvas.java) that would allow reducing these values to say 2% and 1% respectively which likely is more appropriate for our particular ListGrid.
Is there a supported/correct way of:
1. Reducing the region at the top/bottom of the ListGrid where this automatic scrolling starts
2. Reduce the rate at which the scrolling occurs when automatic scrolling is performed.
Thank you for any help/hints.
Comment