Views
Gadgets Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvComboBox::PopupMenuFactory Class Referenceabstract

#include <ilviews/gadgets/combo.h>

Public Member Functions

virtual PopupMenucreatePopup (IlvComboBox *combo, IlUShort count=0, const char *const *labels=0, IlUShort thick=IlvDefaultGadgetThickness, IlvPalette *palette=0) const =0
 Creates an populates a popup menu for a combo box. More...
 

Detailed Description

Library: ilvgadgt

This class provides a way to replace the creation of a default popup menu in the constructor of IlvComboBox. To do so, you must define your own subclass of IlvComboBox::PopupMenuFactory and override the method createPopup().
Then you create an instance of this factory and call SetPopupMenuFactory(). Until the factory is unset, all instances of IlvComboBox() will use your version of createPopup() to create the combo box popup menu.

Note
IlvScrolledComboBox and its subclasses do not use the factory because they use an IlvStringList instead of a popup menu.
See also
IlvComboBox::PopupMenu

Member Function Documentation

◆ createPopup()

virtual PopupMenu* IlvComboBox::PopupMenuFactory::createPopup ( IlvComboBox combo,
IlUShort  count = 0,
const char *const *  labels = 0,
IlUShort  thick = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
) const
pure virtual

Creates an populates a popup menu for a combo box.

When the factory is set by SetPopupMenuFactory(), the IlvComboBox constructor calls this method with the same arguments.

Warning
The returned object MUST be an instance of IlvComboBox::PopupMenu or a subclass.
Parameters
comboThe combo box.
countThe number of labels in the array labels.
labelsAn array of count strings.
thickThe thickness of the combo box.
paletteThe palette used by the combo box.
Returns
An instance of IlvComboBox::PopupMenu or a subclass.