OWL NExt - Knowledge Base

[ Home | Contents | Search | Next | Previous | Up ]

ComboBox on a dockable toolbar

Date: 11/29/99
Time: 11:44:36 PM

Q.    I'm trying to put several ComboBoxes on to a dockable tool bar but haven't had much luck. I've checked out the help on TControlGadget, but I'm no closer. Does anyone have an example of the code? How would I go about getting data from it?would I initalise it in InitMainWindow?

A.    Create a Combo Box and insert it as a control gadget

    cb->Insert( *new TControlGadget( *new QADepartmentsBox( 0, DepartmentsBoxId, 0, 0, 200, 100, CBS_DROPDOWNLIST, 0 ) ) );

    Create a TCombo Class:

    QADepartmentsBox::QADepartmentsBox(TWindow* parent, int id, int x, int y, int w, int h, uint32 style, uint textLimit, TModule* module) :
    TComboBox(parent, id, x, y, w, h, style, textLimit, module)
    {
        // INSERT>> Your constructor code here.
    }

Last changed: July 14, 2001