Fix bug #749 : size of tables truncated to unreadable in the tree

This commit is contained in:
Ansgar Becker
2008-09-16 20:29:15 +00:00
parent b6e243545d
commit 02ae49f203
2 changed files with 11 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ object MDIChild: TMDIChild
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages]
TreeOptions.SelectionOptions = [toRightClickSelect]
OnChange = DBtreeChange
OnClick = DBtreeClick
OnDblClick = DBtreeDblClick
OnGetText = DBtreeGetText
OnPaintText = DBtreePaintText

View File

@@ -446,6 +446,7 @@ type
CellRect: TRect);
procedure menuShowSizeColumnClick(Sender: TObject);
procedure DataGridColumnResize(Sender: TVTHeader; Column: TColumnIndex);
procedure DBtreeClick(Sender: TObject);
private
uptime : Integer;
@@ -6367,4 +6368,13 @@ begin
PrevTableColWidths.Values[col.Text] := inttostr(col.Width);
end;
procedure TMDIChild.DBtreeClick(Sender: TObject);
begin
// Auto resize "Size" column in dbtree when needed
if coVisible in DBTree.Header.Columns[1].Options then
DBTree.Header.AutoFitColumns(False, smaUseColumnOption, 1, 1);
end;
end.