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 blob editor. Related to #395.
This commit is contained in:
@@ -35,6 +35,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;
|
||||
@@ -65,6 +66,15 @@ begin
|
||||
memoText.Text := Copy(text, 3);
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmBinEditor.SetTitleText(Title: String);
|
||||
begin
|
||||
// Add column name to window title bar
|
||||
if Title <> '' then
|
||||
Caption := Title + ' - ' + Caption;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmBinEditor.SetMaxLength(len: integer);
|
||||
begin
|
||||
// Input: Length in bytes.
|
||||
|
||||
@@ -62,6 +62,7 @@ type
|
||||
FForm: TfrmBinEditor;
|
||||
public
|
||||
MaxLength: Integer;
|
||||
TitleText: String;
|
||||
constructor Create(Tree: TVirtualStringTree); override;
|
||||
destructor Destroy; override;
|
||||
function BeginEdit: Boolean; override;
|
||||
@@ -456,6 +457,7 @@ begin
|
||||
FForm := TfrmBinEditor.Create(Ftree);
|
||||
FForm.SetFont(FCellFont);
|
||||
FForm.SetText(FCellText);
|
||||
FForm.SetTitleText(TitleText);
|
||||
FForm.SetMaxLength(MaxLength);
|
||||
end;
|
||||
|
||||
|
||||
@@ -9070,6 +9070,7 @@ begin
|
||||
end else if (TypeCat in [dtcBinary, dtcSpatial]) and AppSettings.ReadBool(asFieldEditorBinary) then begin
|
||||
HexEditor := THexEditorLink.Create(VT);
|
||||
HexEditor.MaxLength := Results.MaxLength(Column);
|
||||
HexEditor.TitleText := Results.ColumnOrgNames[Column];
|
||||
EditLink := HexEditor;
|
||||
end else if (TypeCat = dtcTemporal) and AppSettings.ReadBool(asFieldEditorDatetime) then begin
|
||||
// Ensure date/time editor starts with a non-empty text value
|
||||
|
||||
Reference in New Issue
Block a user