mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
qt5: implement combobox readonly
git-svn-id: branches/comboboxreadonly@63240 -
This commit is contained in:
parent
02b7d44d7d
commit
6c358d11ef
@ -90,6 +90,7 @@ type
|
||||
class procedure SetItemIndex(const ACustomComboBox: TCustomComboBox; NewIndex: integer); override;
|
||||
class procedure SetMaxLength(const ACustomComboBox: TCustomComboBox; NewLength: integer); override;
|
||||
class procedure SetStyle(const ACustomComboBox: TCustomComboBox; NewStyle: TComboBoxStyle); override;
|
||||
class procedure SetReadOnly(const ACustomComboBox: TCustomComboBox; NewReadOnly: boolean); override;
|
||||
|
||||
class procedure Sort(const ACustomComboBox: TCustomComboBox; AList: TStrings; IsSorted: boolean); override;
|
||||
|
||||
@ -1589,6 +1590,17 @@ begin
|
||||
inherited SetStyle(ACustomComboBox, NewStyle);
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomComboBox.SetReadOnly(const ACustomComboBox: TCustomComboBox; NewReadOnly: boolean);
|
||||
var
|
||||
LineEdit : TQtLineEdit;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ACustomComboBox, 'SetReadOnly') then
|
||||
Exit;
|
||||
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
||||
if LineEdit <> nil then
|
||||
LineEdit.setReadOnly(NewReadOnly);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TQtWSCustomComboBox.GetItems
|
||||
Params: None
|
||||
|
Loading…
Reference in New Issue
Block a user