mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-30 20:03:40 +02:00
fixed TEdit to eat normal keys and avoid triggering accelerators
git-svn-id: trunk@7424 -
This commit is contained in:
parent
288f1343c8
commit
63ebe03976
@ -847,7 +847,7 @@ begin
|
||||
ecViewJumpHistory: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecJumpToPrevError: SetResult(VK_F7,[ssAlt],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecJumpToNextError: SetResult(VK_F8,[ssAlt],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecOpenFileAtCursor: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecOpenFileAtCursor: SetResult(VK_RETURN,[ssCtrl],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
|
||||
// marker
|
||||
ecGotoMarker0: SetResult(VK_Q,[ssCtrl],VK_0,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
|
@ -326,6 +326,17 @@ begin
|
||||
if Key=VK_RETURN then EditingDone;
|
||||
end;
|
||||
|
||||
procedure TCustomEdit.WMChar(var Message: TLMChar);
|
||||
begin
|
||||
// all normal characters are handled by the memo
|
||||
//debugln('TCustomEdit.WMChar ',DbgSName(Self),' ',dbgs(Message.CharCode));
|
||||
if Message.CharCode in [ord('A')..ord('Z'),ord('a')..ord('z')] then
|
||||
// eat normal keys, so they don't trigger accelerators
|
||||
Message.Result := 1
|
||||
else
|
||||
inherited WMChar(Message);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomEdit.SetModified
|
||||
Params: Value to set FModified to
|
||||
@ -375,6 +386,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.40 2005/07/25 23:11:48 mattias
|
||||
fixed TEdit to eat normal keys and avoid triggering accelerators
|
||||
|
||||
Revision 1.39 2005/03/10 09:02:11 mattias
|
||||
handle tab key in ControlKeyDown in TCustomEdit and TCustomComboBox
|
||||
|
||||
|
@ -213,6 +213,12 @@ begin
|
||||
inherited ControlKeyDown(Key, Shift);
|
||||
end;
|
||||
|
||||
procedure TCustomMemo.WMChar(var Message: TLMChar);
|
||||
begin
|
||||
// all normal characters are handled by the memo
|
||||
Message.Result := 1;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomMemo.SetWordWrap
|
||||
Params:
|
||||
@ -234,6 +240,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.36 2005/07/25 23:11:48 mattias
|
||||
fixed TEdit to eat normal keys and avoid triggering accelerators
|
||||
|
||||
Revision 1.35 2005/07/17 01:05:04 mattias
|
||||
started basic docking anchoring and made Contributors.txt ASCII to show everywhere
|
||||
|
||||
|
@ -583,7 +583,7 @@ type
|
||||
procedure SetModified(Value: Boolean);
|
||||
procedure SetPasswordChar(const AValue: Char);
|
||||
procedure SetReadOnly(Value: Boolean);
|
||||
Protected
|
||||
protected
|
||||
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure CMTextChanged(Var Message: TLMessage); message CM_TextChanged;
|
||||
@ -600,6 +600,7 @@ type
|
||||
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
||||
procedure ControlKeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
|
||||
procedure WMChar(var Message: TLMChar); message LM_CHAR;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
procedure SelectAll;
|
||||
@ -667,6 +668,7 @@ type
|
||||
procedure Loaded; override;
|
||||
function WordWrapIsStored: boolean; virtual;
|
||||
procedure ControlKeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
procedure WMChar(var Message: TLMChar); message LM_CHAR;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -1263,6 +1265,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.214 2005/07/25 23:11:48 mattias
|
||||
fixed TEdit to eat normal keys and avoid triggering accelerators
|
||||
|
||||
Revision 1.213 2005/07/19 14:18:44 micha
|
||||
fix bug 741: fix setting multiselect to not select all items; default extendedselect is true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user