tools widget, prevent the input box on keypress

on gtk2 a small input box is displayed by default, which is annoying and of not usefulness
This commit is contained in:
Basile Burg 2023-02-27 23:37:38 +01:00
parent 81c336c3bb
commit 8622a7039a
2 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@ inherited ToolsEditorWidget: TToolsEditorWidget
ItemHeight = 0
OnDblClick = lstToolsDblClick
OnDrawItem = lstToolsDrawItem
OnKeyPress = lstToolsKeyPress
OnSelectionChange = lstToolsSelectionChange
ScrollWidth = 158
Style = lbOwnerDrawFixed

View File

@ -36,6 +36,7 @@ type
procedure lstToolsDblClick(Sender: TObject);
procedure lstToolsDrawItem(Control: TWinControl; Index: Integer;
ARect: TRect; State: TOwnerDrawState);
procedure lstToolsKeyPress(Sender: TObject; var Key: char);
procedure lstToolsSelectionChange(Sender: TObject; User: boolean);
procedure propsEdModified(Sender: TObject);
private
@ -261,5 +262,10 @@ begin
lstTools.Canvas.TextOut(rc.Left, rc.Top , CustomTools.tool[Index].toolAlias);
end;
procedure TToolsEditorWidget.lstToolsKeyPress(Sender: TObject; var Key: char);
begin
key := #0;
end;
end.