DataGrid Scrolling problem

andrew at midwestcoastmedia.com andrew at midwestcoastmedia.com
Sun Oct 6 12:42:29 EDT 2019


Something seems to have changed in the datagrid code, because I have  
an old iOS device with a version of my software from over a year ago  
and it scrolls fine so I feel like the issue is with my scroller and  
DG2 (this stack pre-dates that change).

I tried Ralph's suggestion of adding 20px, but that wasn't close to  
enough extra cushion: the datagrid is showing all the items EXCEPT the  
last one (unless you scroll "past", but the scroller bounces back to  
showing items 1 to -2 of the datagrid).

Now, I do have a fixed height rows that are much larger than 20px (132  
to be exact). What came closer to working for me was to add an entire  
row to my dgFormattedHeight but this still cuts off the descenders of  
the last row of text.

    put 0,0,(the dgFormattedWidth of group "TSM"),(the  
dgFormattedHeight of group "TSM" + the dgProp["row height"] of group  
"TSM") into tContentRect
    mobileControlCreate "scroller", "listScroll"
    mobileControlSet "listScroll", "contentRect",tContentRect


--Andrew Bell


> I always add 20 PXs to the formattedheight of the control. Then use that
> result for item 4 of the contentrect to solve this. 20 seems to work on all
> device resolutions I've tested although I'm sure that there is a formula
> based on the device resolution that would create consistency between
> devices.
>
>
> Ralph DiMola






More information about the use-livecode mailing list