Getting Started with DataGrid and another datagrid form

Douglas Ruisaard dougr at telus.net
Sun Aug 5 14:07:30 EDT 2018


Ah ... I think I can answer this.  Basically, you don't *have* to code the "Layout Control" beyond the recommended:

  set the rect of graphic "Background" of me to pControlRect

and even that may be, technically, optional.

The handler is there (I believe) as a method by which you can "dynamically" change the layout of a row (using grid FORMS.. the Behavior script is NOT used for TABLE grids) and/or being able to programmatically alter the layout of a row without going through the whole "Edit Group" method.

Not sure what you mean or asking about the "WYSIG panel" (never seen "WYSIG" .. only know "WYSIWYG" ... same thing?) ... do you mean the Row Template?

Douglas Ruisaard
Trilogy Software
(250) 573-3935

> From: Sannyasin Brahmanathaswami <brahma at hindu.org>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Subject: Re: Getting Started with DataGrid and another datagrid form
> Message-ID:
> 	<MWHPR14MB12329F5C3378D6D476801E6CC5210 at MWHPR14MB1232.namprd14.prod.outlook.com>
> 
> Content-Type: text/plain; charset="us-ascii"
> 
> I slowly studying as much as we can on the datagrid,and "digging" in it with an first attempt to build
> a form.
> 
> One thing is not clear to me.
> 
> 1) Have the  WYSIG panel to build the datagrid form.
> 
> 2) why then do we  have, in the Behavior Script  this handler?
> 
> Isn't the layout already pre-determined in the template?
> 
> on LayoutControl pControlRect, pWorkingRect
> 
> local theFieldRect
> 
> -- This message is sent when you should layout your template's controls.
> 
> -- This is where you resize the 'Background' graphic, resize fields and
> 
> -- position objects.
> 
> -- For fixed height data grid forms you can use items 1 through 4 of pControlRect as
> 
> -- boundaries for laying out your controls.
> 
> -- For variable height data grid forms you can use items 1 through 3 of pControlRect as
> 
> -- boundaries, expanding the height of your control as needed.
> 
> -- The working rect is defined area of the control you can safelt use.
> 
> -- Use this rect to make sure your controls don't overlap with any edit mode controls.
> 
> -- Example:
> 
> put the rect of field "Label" of me into theFieldRect
> 
> put item 1 of pWorkingRect into item 1 of theFieldRect
> 
> put item 3 of pWorkingRect - 5 into item 3 of theFieldRect
> 
> set the rect of field "Label" of me to theFieldRect
> 
> set the rect of graphic "Background" of me to pControlRect
> 
> end LayoutControl
> 
> 
> BR
> 
> 





More information about the use-livecode mailing list