mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a LookAndFeel method to customise the options of a ComboBox's PopupMenu
This commit is contained in:
parent
fefbbc89b4
commit
64be913fa2
4 changed files with 16 additions and 6 deletions
|
|
@ -545,12 +545,10 @@ void ComboBox::showPopup()
|
|||
menu.addItem (1, noChoicesMessage, false, false);
|
||||
}
|
||||
|
||||
menu.setLookAndFeel (&getLookAndFeel());
|
||||
menu.showMenuAsync (PopupMenu::Options().withTargetComponent (this)
|
||||
.withItemThatMustBeVisible (getSelectedId())
|
||||
.withMinimumWidth (getWidth())
|
||||
.withMaximumNumColumns (1)
|
||||
.withStandardItemHeight (label->getHeight()),
|
||||
auto& lookAndFeel = getLookAndFeel();
|
||||
|
||||
menu.setLookAndFeel (&lookAndFeel);
|
||||
menu.showMenuAsync (lookAndFeel.getOptionsForComboBoxPopupMenu (*this, *label),
|
||||
ModalCallbackFunction::forComponent (comboBoxPopupMenuFinishedCallback, this));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue