Display column name in title bar of popup blob editor. Related to #395.

This commit is contained in:
Ansgar Becker
2018-12-05 21:22:09 +01:00
parent a7c0883e9a
commit f5cc9efc4f
3 changed files with 13 additions and 0 deletions

View File

@@ -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.

View File

@@ -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;

View File

@@ -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