Subject Re: [IBO] GridColWidth
Author Helen Borrie
At 12:28 PM 20-12-00 +0100, you wrote:


>Harald Klomann schrieb:
> >
> > Hi,
> >
> > how can I check out, if a grids columns width is big enough
> > to display the entire text it has to display ?
>
>Jason,
>
>Additional question:
>
>TIB_Grid is a subclass of TIB_CustomGrid which is a subclass of
>TCustomGrid:
>
>TCustomGrid has a property
>ColWidths[Index: Longint]: Integer;
>
>Where is this property in the IB_Grids???? It vanished....

It didn't vanish, it moved into the Dataset attribute
FieldsDisplayWidth. Set this to the length that you get with
'molmolmol...' for the varchar size and you should be able to see the full
width of any value in the column.


>I can determine how wide the text in a column is when moving with the
>mouse over the grid, but I can't see how to find out how wide the
>current column in the grid (where the mouse is moving over) is.
>
>If the column size hasn't changed it seems to be the default width.
>otherwise the width is in the FieldDisplayWidth-property of the
>underlying query.

Yes: and this is what you need to play with if you want to stretch or
shrink the column at run-time. There was a thread about this not too long
ago and I seem to recall Geoff Worboys posted an algorithm for getting at
that attribute...

Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________