Andre
2007-10-03 14:15:13 UTC
Hello,
my program hast a item list, wich is much like Windows Explorer right
pane, in Detail mode.
But the automatic resizing of column widths is not working as I want. I
want it to accomodate the Column name (e.g. "Name", "Size", Type") and
the column item too. The width must be big enough everything is
completely show.
In TListColumn doc I find the property:
------------------------------------------------------------------------
TListColumn::WidthType
Indicates whether the column is sized automatically.
typedef int TWidth;
__property TWidth WidthType = {read=FWidth, nodefault};
Description
The read-only WidthType property indicates how the column width is
determined. WidthType is set to the same value as Width. WidthType,
however, retains its negative value when Width changes automatically.
If WidthType returns -1, the list column is automatically resized to
accommodate the text in the column. If WidthType returns -2, the list
column is automatically resized to accommodate the column header. If
WidthType returns a nonnegative value, the column is not resized
automatically; in this case, the value of Width and WidthType should be
the same.
To enable automatic column resizing, assign the value -1 or -2 directly
to Width.
------------------------------------------------------------------------
I want it to accomodate both the header and the column text. So I have
to do it by hand? How?
Thank you.
André
my program hast a item list, wich is much like Windows Explorer right
pane, in Detail mode.
But the automatic resizing of column widths is not working as I want. I
want it to accomodate the Column name (e.g. "Name", "Size", Type") and
the column item too. The width must be big enough everything is
completely show.
In TListColumn doc I find the property:
------------------------------------------------------------------------
TListColumn::WidthType
Indicates whether the column is sized automatically.
typedef int TWidth;
__property TWidth WidthType = {read=FWidth, nodefault};
Description
The read-only WidthType property indicates how the column width is
determined. WidthType is set to the same value as Width. WidthType,
however, retains its negative value when Width changes automatically.
If WidthType returns -1, the list column is automatically resized to
accommodate the text in the column. If WidthType returns -2, the list
column is automatically resized to accommodate the column header. If
WidthType returns a nonnegative value, the column is not resized
automatically; in this case, the value of Width and WidthType should be
the same.
To enable automatic column resizing, assign the value -1 or -2 directly
to Width.
------------------------------------------------------------------------
I want it to accomodate both the header and the column text. So I have
to do it by hand? How?
Thank you.
André