mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 18:43:50 +02:00
Qt: allow edit of combobox with style csSimple. issue #22528
git-svn-id: trunk@38149 -
This commit is contained in:
parent
96b40a914a
commit
7a161299ec
@ -1341,7 +1341,8 @@ begin
|
||||
QtComboBox.FList.Assign(TCustomComboBox(AWinControl).Items);
|
||||
QtComboBox.setCurrentIndex(ItemIndex);
|
||||
QtComboBox.setText(GetUTF8String(Text));
|
||||
QtComboBox.setEditable(AParams.Style and CBS_DROPDOWN <> 0);
|
||||
QtComboBox.setEditable((AParams.Style and CBS_DROPDOWN <> 0) or
|
||||
(AParams.Style and CBS_SIMPLE <> 0));
|
||||
|
||||
QtComboBox.AttachEvents;
|
||||
QtComboBox.OwnerDrawn := (AParams.Style and CBS_OWNERDRAWFIXED <> 0) or
|
||||
@ -1566,7 +1567,7 @@ end;
|
||||
class procedure TQtWSCustomComboBox.SetStyle(
|
||||
const ACustomComboBox: TCustomComboBox; NewStyle: TComboBoxStyle);
|
||||
begin
|
||||
TQtComboBox(ACustomComboBox.Handle).setEditable(NewStyle = csDropDown);
|
||||
TQtComboBox(ACustomComboBox.Handle).setEditable(NewStyle in [csDropDown, csSimple]);
|
||||
TQtComboBox(ACustomComboBox.Handle).OwnerDrawn := NewStyle in
|
||||
[csOwnerDrawFixed,
|
||||
csOwnerDrawVariable];
|
||||
|
Loading…
Reference in New Issue
Block a user