Datagrid: multiple hilites

Trevor DeVore lists at mangomultimedia.com
Tue Oct 20 10:47:51 EDT 2009


On Oct 17, 2009, at 7:02 PM, David Bovill wrote:

> I checked again Trevor. It makes sense that it does not work in  
> cases where
> the controls are not cached - where it is broken is when the  
> controls are
> cached but you try to get:
>
> the dgRectOfIndex [1] of dataGrid
>
> and the controls are scrolled heavily, so that the invisible row  
> view would
> be above the top of the card. In these cases it does not return the  
> correct
> geometry as the invisible row view is limited to the top of the  
> screen and
> no its "true" negative y values. These means that if you try to  
> scroll to
> the first row it does not work.

I just performed the following test and the dgRectOfIndex[1] returned  
the proper result.

1) Created new Data Grid.
2) Changed style to "form"
3) Turned off fixed row height
4) Turned on "cache controls"
5) Turned off "persistent data"
6) Positioned Data Grid at 0,0

I then added about 50 or so lines to the Data Grid. Here are results:

put the dgRectOfIndex[1] of group 1
0,0,233,21

I then scrolled to the bottom of the Data Grid:

put the dgRectOfIndex[1] of group 1
0,-451,233,-430

I then tried scrolling the first index back into view and it worked:

dispatch "ScrollRectIntoView" to group 1 with the dgRectOfIndex[1] of  
group 1

Just let me know what steps you are taking and what you are seeing. If  
there is a bug that is the only way I can track it down.

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com



More information about the use-livecode mailing list