TCustomComboBox: call inherited (Utf8)KeyPress before changing the case (when CharCase <> ecNormal)

git-svn-id: trunk@44866 -
This commit is contained in:
bart 2014-05-01 12:09:26 +00:00
parent f7c6916db6
commit 9cc96a93a2

View File

@ -566,22 +566,24 @@ end;
procedure TCustomComboBox.KeyPress(var Key: char);
begin
//First invoke OnKeyPress, or else CharCase may be reverted again
inherited KeyPress(Key);
//Convert character cases if FCharCase is not ecNormalCase
case FCharCase of
ecLowerCase: Key := LowerCase(Key);
ecUpperCase: Key := UpCase(Key);
end;
inherited KeyPress(Key);
end;
procedure TCustomComboBox.UTF8KeyPress(var UTF8Key: TUTF8Char);
begin
//First invoke OnUtf8KeyPress, or else CharCase may be reverted again
inherited UTF8KeyPress(UTF8Key);
//Convert character cases if FCharCase is not ecNormalCase
case FCharCase of
ecLowerCase: UTF8Key := UTF8LowerCase(UTF8Key);
ecUpperCase: UTF8Key := UTF8UpperCase(UTF8Key);
end;
inherited UTF8KeyPress(UTF8Key);
end;
procedure TCustomComboBox.MouseUp(Button: TMouseButton; Shift:TShiftState;