Subject Re: [IBO] ColResizing of TIB_Grid during runtime
Author Paul Vinkenoog
Hello Ulrich,

>> First thing that comes to my mind: write an OnResize event handler
>> for the grid and have it call TIB_Grid.StretchGridColumns.
>
> I had the same idea, but what is the direkt way to the widths of the
> columns? They are defined in property FieldsDisplayWidth which is a
> TStringList. Is there a better way than to readout and refill the
> TStringList? Is there a faster way than to to it with some string
> manipulations?

If you call StretchGridColumns, you don't have to perform string
manipulation. Just call the procedure and the work is done for you.

Grid.ColWidths gives direct access to the column widths, but alas:
this protected TCustomGrid property isn't published by TIB_CustomGrid
or TIB_Grid. So if you want to use that, you have to make your own
subclass of TIB_(Custom)Grid.

Greetings,
Paul Vinkenoog


PS:
About that third party auto-control-resize thingy: if this works
proportionally, you could have done it yourself by adding akRight and
akBottom to the Anchors of every control on the form.