Page 1 of 1

Mobile scroller - height of the datagrid

Posted: Thu Aug 31, 2017 10:33 am
by tomsve
Not sure if I set the height of the datagrid in a good way or not, for use in a mobile scroller. In some cases my datagrid will contain zero rows, and in some cases 200 rows (height > 1000 pixels). How do I change the height in a dynamic way?

Code: Select all

put  (0,0,the formattedwidth of control pName,the formattedheight of control pName) into tRect
   mobileControlSet pName, "contentRect", tRect
^^ Doesn't seem to do the trick... I've tried with both the datagrid and the group that contains the datagrid.

The only way I can solve it, is by manually calculate the total height by rowheight * number of rows, and use

Code: Select all

set the height of group "dgList" to iHeight
in openCard.

But are there any better ways?

Re: Mobile scroller - height of the datagrid

Posted: Thu Aug 31, 2017 11:10 am
by Klaus
Hi Tom,

not sure, but maybe you are looking for: the dgFormattedheight of grp "your datagrid here..." ?


Best

Klaus

Re: Mobile scroller - height of the datagrid

Posted: Thu Aug 31, 2017 2:31 pm
by tomsve
Thank you very much Klaus! It helped me!

Another related thing to scrolling - is it possible to make it slightly more smooth? If I compare my scroller with other apps on iPhone, other scrollers are simply more smooth.