Subject | Re: [IBO] column widths of ib_grid |
---|---|
Author | Helen Borrie |
Post date | 2006-02-22T05:06:54Z |
At 03:28 PM 22/02/2006, you wrote:
DisplayWidth property of TIB_Column, or the FieldsDisplayWidth list
of the dataset, to get or set the width in pixels. Use the
GridFields[n] property of the grid to get hold of the actual column
object underlying the grid column.
E.g. let's suppose a simple routine to set all of the visible fields
to 50 pixels (unlikely, I know, but it gives the picture!)
var
ii: integer;
.....
with ib_grid1 do
for ii := 0 to GridFieldCount - 1 do
TIB_Column(GridFields[ii]).DisplayWidth := 50;
Helen
Helen
>How to read and/or set the individual column widths of an ib_grid atIn IB_controls, the data determines the dimensions. So access the
>runtime? Something in the line of:
> w := ib_grid1.colwidth[1];
> ib_grid1.colwidth[1] := 50;
>
>I wanted to know this because I need to resize my form to display all
>the columns of a grid (without horiz scrollbars), if possible.
DisplayWidth property of TIB_Column, or the FieldsDisplayWidth list
of the dataset, to get or set the width in pixels. Use the
GridFields[n] property of the grid to get hold of the actual column
object underlying the grid column.
E.g. let's suppose a simple routine to set all of the visible fields
to 50 pixels (unlikely, I know, but it gives the picture!)
var
ii: integer;
.....
with ib_grid1 do
for ii := 0 to GridFieldCount - 1 do
TIB_Column(GridFields[ii]).DisplayWidth := 50;
Helen
Helen