mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Display column name in title bar of popup text editor. Closes #395.
This commit is contained in:
@@ -139,6 +139,7 @@ type
|
||||
procedure ButtonClick(Sender: TObject);
|
||||
public
|
||||
ButtonVisible: Boolean;
|
||||
TitleText: String;
|
||||
constructor Create(Tree: TVirtualStringTree); override;
|
||||
destructor Destroy; override;
|
||||
function BeginEdit: Boolean; override;
|
||||
@@ -1130,6 +1131,7 @@ begin
|
||||
FTextEditor := TfrmTextEditor.Create(FTree);
|
||||
FTextEditor.SetFont(FEdit.Font);
|
||||
FTextEditor.SetText(FEdit.Text);
|
||||
FTextEditor.SetTitleText(TitleText);
|
||||
FTextEditor.Modified := FEdit.Modified;
|
||||
FTextEditor.SetMaxLength(Self.FMaxLength);
|
||||
FTextEditor.ShowModal;
|
||||
|
||||
@@ -56,6 +56,7 @@ type
|
||||
public
|
||||
function GetText: String;
|
||||
procedure SetText(text: String);
|
||||
procedure SetTitleText(Title: String);
|
||||
procedure SetMaxLength(len: integer);
|
||||
procedure SetFont(font: TFont);
|
||||
property Modified: Boolean read FModified write SetModified;
|
||||
@@ -108,6 +109,14 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmTextEditor.SetTitleText(Title: String);
|
||||
begin
|
||||
// Add column name to window title bar
|
||||
if Title <> '' then
|
||||
Caption := Title + ' - ' + Caption;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmTextEditor.SelectLinebreaks(Sender: TObject);
|
||||
var
|
||||
Selected, Item: TMenuItem;
|
||||
|
||||
Reference in New Issue
Block a user