dg okay with elements larger than the dg itself?

Richard Gaskin ambassador at fourthworld.com
Thu Mar 6 10:18:14 EST 2014


Trevor DeVore wrote:
> On Wed, Mar 5, 2014 at 6:27 PM, Richard Gaskin wrote:
>
>> I've used the DataGrid successfully on several projects, but today is the
>> first time I've tried this and I'm getting odd results:
>>
>> I have some form elements which are much taller than the DataGrid control
>> itself, and I'm finding that it isn't calculating the heights correctly,
>> nor scrolling correctly when using the scrollbar arrows.
>>
>> Is this a known limitation, or is it just me?
>>
>
> The height of the form elements should work even if they are taller than
> the data grid itself. Unless of course they exceed the ~32,000 limit for
> group height that the engine imposes. If the rows don't exceed that height
> then my guess is that the data grid is getting confused about the actual
> height of content for some reason.
>
> Is each row the same size or is each row a different size? If each row is a
> different height then I would first check to see there are any objects in
> your row template that are outside the bounds of what the row height should
> be after LayoutControl finishes. The data grid is going to look at the
> formattedHeight of each row after LayoutControl. If some object in the
> template group causes the formattedHeight to be something other than you
> expect then it might cause problems.

Thanks for that background, Trevor.

For the task at hand I found a way to get what I need from a single 
field for now, but I'll likely return to using the DG for part of that 
later on, and your tips will be very helpful.

And FWIW, I don't think I say it often enough, but the DG really is 
quite a remarkable piece of code.  The feature-completeness makes it as 
exemplary as its flexibility makes it enjoyable.  Great work.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list