Accessing customised columns in a datagrid

Trevor DeVore lists at mangomultimedia.com
Mon Mar 28 21:03:18 EDT 2011


On Mon, Mar 28, 2011 at 12:46 PM, Peter Haworth <pete at mollysrevenge.com>wrote:

> One other quick question for you.  I've customised a column to contain a
> check box.  All works fine but I can't get the checkbox to be centered in
> its column using the justification options in the column inspector.  How can
> I center a check box (it doesn't have a label and I've sized to be just the
> size of the actual checkbox itself).  Can this be done by script/message
> box?
>

The setting in the column inspector doesn't activate any code. The code for
a default column just looks at the setting for the column being rendered and
positions the text accordingly. If you create a custom column you need to
add that logic yourself.

Two things you can try -

1) Set the lockLoc of your custom column group to true. I can't remember if
this works or not but it may keep your checkbox in the center.

2) If (1) doesn't work then add a "canvas" to your column. This can be a
transparent button or a graphic and you size to fit the width of the column
in LayoutControl. You then position the checkbox in the center of the canvas
and it will appear centered.

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
LiveCode Resources for Developers: http://livecode.bluemangolearning.com



More information about the use-livecode mailing list