mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +02:00
replace TCustomCheckListBox.KeyPress with TCustomCheckListBox.KeyDown
git-svn-id: trunk@9404 -
This commit is contained in:
parent
88a04ff101
commit
56df0109ff
@ -45,8 +45,7 @@ type
|
||||
procedure SetChecked(const AIndex: Integer; const AValue: Boolean);
|
||||
procedure SendItemChecked(const AIndex: Integer; const AChecked: Boolean);
|
||||
procedure DoChange(var Msg); message LM_CHANGED;
|
||||
procedure KeyPress(var Key: char); override;
|
||||
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
protected
|
||||
procedure AssignItemDataToCache(const AIndex: Integer; const AData: Pointer); override;
|
||||
procedure AssignCacheToItemData(const AIndex: Integer; const AData: Pointer); override;
|
||||
@ -166,14 +165,14 @@ begin
|
||||
Result := Items.Count;
|
||||
end;
|
||||
|
||||
procedure TCustomCheckListBox.KeyPress(var Key: char);
|
||||
procedure TCustomCheckListBox.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if Key = ' ' then begin
|
||||
if (Key = VK_SPACE) and (Shift=[]) then begin
|
||||
Checked[ItemIndex]:=not Checked[ItemIndex];
|
||||
Key:=VK_UNKNOWN;
|
||||
end else
|
||||
inherited KeyDown(Key,Shift);
|
||||
end;
|
||||
inherited KeyPress(Key);
|
||||
end;
|
||||
|
||||
|
||||
procedure TCustomCheckListBox.SendItemChecked(const AIndex: Integer;
|
||||
const AChecked: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user