Getting Started with DataGrid and another datagrid form
Sannyasin Brahmanathaswami
brahma at hindu.org
Sun Aug 5 13:03:27 EDT 2018
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