mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
If the first column with the number of the column has too less width, sometimes it's not clear that the user can resize it to show its whole text. This change adds an auto-resize mechanism, which is fired after any node structure was changed. Fixes issue #1609.
This commit is contained in:
@ -174,6 +174,8 @@ type
|
||||
procedure listColumnsKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure vtHandleClickOrKeyPress(Sender: TVirtualStringTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; HitPositions: THitPositions);
|
||||
procedure listColumnsStructureChange(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Reason: TChangeReason);
|
||||
private
|
||||
{ Private declarations }
|
||||
FLoaded: Boolean;
|
||||
@ -1087,6 +1089,14 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmTableEditor.listColumnsStructureChange(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Reason: TChangeReason);
|
||||
begin
|
||||
// Auto resize first column to optimal width
|
||||
listColumns.Header.AutoFitColumns(False, smaUseColumnOption, 0, 0);
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmTableEditor.listColumnsNewText(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; NewText: String);
|
||||
var
|
||||
|
Reference in New Issue
Block a user