mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Turn filter input box into a TButtonedEdit, and add a "X" button to the right edge which clears its content.
This commit is contained in:
@@ -468,13 +468,19 @@ object MainForm: TMainForm
|
||||
Flat = True
|
||||
OnClick = actFilterPanelExecute
|
||||
end
|
||||
object editFilterVT: TEdit
|
||||
object editFilterVT: TButtonedEdit
|
||||
Left = 70
|
||||
Top = 3
|
||||
Width = 154
|
||||
Height = 21
|
||||
Images = ImageListMain
|
||||
RightButton.Enabled = False
|
||||
RightButton.Hint = 'Clear filter'
|
||||
RightButton.ImageIndex = 26
|
||||
RightButton.Visible = True
|
||||
TabOrder = 0
|
||||
OnChange = editFilterVTChange
|
||||
OnRightButtonClick = editFilterVTRightButtonClick
|
||||
end
|
||||
end
|
||||
object PageControlMain: TPageControl
|
||||
|
||||
@@ -350,7 +350,7 @@ type
|
||||
pnlProcessView: TPanel;
|
||||
SynMemoProcessView: TSynMemo;
|
||||
pnlFilterVT: TPanel;
|
||||
editFilterVT: TEdit;
|
||||
editFilterVT: TButtonedEdit;
|
||||
lblFilterVT: TLabel;
|
||||
lblFilterVTInfo: TLabel;
|
||||
menuEditVariable: TMenuItem;
|
||||
@@ -735,6 +735,7 @@ type
|
||||
procedure actDataShowAllExecute(Sender: TObject);
|
||||
procedure AnyGridInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||
procedure editFilterVTRightButtonClick(Sender: TObject);
|
||||
private
|
||||
FDelimiter: String;
|
||||
FileNameSessionLog: String;
|
||||
@@ -5982,6 +5983,13 @@ begin
|
||||
// Reset typing timer
|
||||
TimerFilterVT.Enabled := False;
|
||||
TimerFilterVT.Enabled := True;
|
||||
editFilterVT.RightButton.Enabled := editFilterVT.Text <> '';
|
||||
end;
|
||||
|
||||
|
||||
procedure TMainForm.editFilterVTRightButtonClick(Sender: TObject);
|
||||
begin
|
||||
(Sender as TButtonedEdit).Clear;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user