LCL: TCheckListBox: dissallow check state change by keyboard VK_SPACE if item is disabled. issue #26682

git-svn-id: trunk@46139 -
This commit is contained in:
zeljko 2014-09-06 08:08:03 +00:00
parent a85a527721
commit e569bee5de

View File

@ -306,7 +306,7 @@ procedure TCustomCheckListBox.KeyDown(var Key: Word; Shift: TShiftState);
var
Index: Integer;
begin
if (Key = VK_SPACE) and (Shift=[]) and (ItemIndex >= 0) then
if (Key = VK_SPACE) and (Shift=[]) and (ItemIndex >= 0) and ItemEnabled[ItemIndex] then
begin
Index := ItemIndex;
Checked[Index] := not Checked[Index];