mirror of https://gitlab.com/basile.b/dexed.git
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:
parent
81c336c3bb
commit
8622a7039a
|
@ -34,6 +34,7 @@ inherited ToolsEditorWidget: TToolsEditorWidget
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnDblClick = lstToolsDblClick
|
OnDblClick = lstToolsDblClick
|
||||||
OnDrawItem = lstToolsDrawItem
|
OnDrawItem = lstToolsDrawItem
|
||||||
|
OnKeyPress = lstToolsKeyPress
|
||||||
OnSelectionChange = lstToolsSelectionChange
|
OnSelectionChange = lstToolsSelectionChange
|
||||||
ScrollWidth = 158
|
ScrollWidth = 158
|
||||||
Style = lbOwnerDrawFixed
|
Style = lbOwnerDrawFixed
|
||||||
|
|
|
@ -36,6 +36,7 @@ type
|
||||||
procedure lstToolsDblClick(Sender: TObject);
|
procedure lstToolsDblClick(Sender: TObject);
|
||||||
procedure lstToolsDrawItem(Control: TWinControl; Index: Integer;
|
procedure lstToolsDrawItem(Control: TWinControl; Index: Integer;
|
||||||
ARect: TRect; State: TOwnerDrawState);
|
ARect: TRect; State: TOwnerDrawState);
|
||||||
|
procedure lstToolsKeyPress(Sender: TObject; var Key: char);
|
||||||
procedure lstToolsSelectionChange(Sender: TObject; User: boolean);
|
procedure lstToolsSelectionChange(Sender: TObject; User: boolean);
|
||||||
procedure propsEdModified(Sender: TObject);
|
procedure propsEdModified(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
@ -261,5 +262,10 @@ begin
|
||||||
lstTools.Canvas.TextOut(rc.Left, rc.Top , CustomTools.tool[Index].toolAlias);
|
lstTools.Canvas.TextOut(rc.Left, rc.Top , CustomTools.tool[Index].toolAlias);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TToolsEditorWidget.lstToolsKeyPress(Sender: TObject; var Key: char);
|
||||||
|
begin
|
||||||
|
key := #0;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue