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 <bra...@hindu.org>
> To: How to use LiveCode <use-livecode@lists.runrev.com>
> Subject: Re: Getting Started with DataGrid and another datagrid form
> Message-ID:
>       
> <mwhpr14mb12329f5c3378d6d476801e6cc5...@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
> 
> 


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to