Qt: check enable state of TQtLineEdit & TQtComboBox when using AutoSelect property.

git-svn-id: trunk@16636 -
This commit is contained in:
zeljko 2008-09-18 20:29:47 +00:00
parent d8e36f10fb
commit 7dcfdfde0f

View File

@ -5031,7 +5031,9 @@ begin
begin begin
// it would be better if we have AutoSelect published from TCustomEdit // it would be better if we have AutoSelect published from TCustomEdit
// then TMaskEdit also belongs here. // then TMaskEdit also belongs here.
if ((LCLObject is TEdit) and (TEdit(LCLObject).AutoSelect)) then if ((LCLObject is TEdit) and
(getEnabled) and
(TEdit(LCLObject).AutoSelect)) then
QLineEdit_selectAll(QLineEditH(Widget)); QLineEdit_selectAll(QLineEditH(Widget));
end; end;
end; end;
@ -6030,7 +6032,9 @@ begin
[QtTabFocusReason,QtBacktabFocusReason,QtActiveWindowFocusReason, [QtTabFocusReason,QtBacktabFocusReason,QtActiveWindowFocusReason,
QtShortcutFocusReason, QtOtherFocusReason] then QtShortcutFocusReason, QtOtherFocusReason] then
begin begin
if Assigned(LineEdit) and TComboBox(LCLObject).AutoSelect then if Assigned(LineEdit) and
LineEdit.getEnabled and
TComboBox(LCLObject).AutoSelect then
LineEdit.selectAll; LineEdit.selectAll;
end; end;
TCustomComboBox(LCLObject).IntfGetItems; TCustomComboBox(LCLObject).IntfGetItems;