Calculate number of rows in a DataGrid
Trevor DeVore
lists at mangomultimedia.com
Wed Nov 19 14:38:43 EST 2014
On Wed, Nov 19, 2014 at 2:01 PM, Terence Heaford <t.heaford at btinternet.com>
wrote:
>
> Imagine a data grid with 20 rows with each row empty.
>
> I want to return 20.
>
Ah, so you want to know how many rows could be drawn in the visible area of
the data grid. This should work:
put the dgWorkingRect of group "MyDataGrid" into theVisibleRect
put item 4 of theVisibleRect - item 2 of theVisibleRect into
theVisibleHeight
put theVisibleHeight / the dgProps["row height"] of group "MyDataGrid" into
theNumberOfVisibleRows
--
Trevor DeVore
ScreenSteps
www.screensteps.com - www.clarify-it.com
More information about the use-livecode
mailing list