How to resize the columns of a datagrid?

Sri sritcp at
Tue Aug 4 10:01:39 EDT 2015

You may want to try this:

1. Save the original width of datagrid in a custom property cOldWidth.

2. In the datagrid script, handle "resizeControl":
on resizeControl
local tFraction
put (the width of me / the cOldWidth of me) into tFraction
repeat for each line tLine in the dgProp[columns] of me
set the dgColumnWidth[tLine] of me to the round of (tFraction * the
dgColumnWidth[tLine] of me)
end repeat

Make sure that the minimum column width and column resizablity properties
are properly set.

I haven't tried this out. Hope it works. The idea is to handle the change
under "resizeControl"


View this message in context:
Sent from the Revolution - User mailing list archive at

More information about the Use-livecode mailing list