Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

UCombobox Class Reference

Combo box gadget. More...

#include <ugadgets.hpp>

Inheritance diagram for UCombobox:

UTextfield UTextbox List of all members.

Public Member Functions

 UCombobox (class UListbox &list, const UArgs &=UArgs::none)
UListboxlist ()
const class UListboxlist () const
UChoicechoice ()
const class UChoicechoice () const
bool isTextMode () const
void setTextMode (bool=true)
UComboboxtextMode (bool st=true)

Friends

UComboboxucombobox (class UListbox &list, const UArgs &a=UArgs::none)

Detailed Description

Combo box gadget.

Geometry: Same Geometry and Properties as UTextfield. This gadget keeps its initial size (which is calculated to make the first child of the list entirely visible).

List and Selection management:

Text mode means that the combox box only displays the text of the selected item. Non-text mode (the default) means that the actual content of the selected item is displayed inside the combo box.

Exemple

XXX* obj = ...;

UCombobox& files = ucombobox( ulistbox(uitem(UPix::doc + "~/ubit/") + uitem(UPix::doc + "~/ubit/campus/") + uitem(UPix::doc + "~/ubit/campus/examples/"), // dont forget the comma // this is a callback of the Combobox, not a callback of the Listbox UOn::action / ucall(rem, target, "file:", &XXX::foo) );

void ObjClass::foo(UEvent& e) { if (e.getSource()) { // returns the UCombobox // collates the text enclosed in the UCombobox and copies it to 's' UStr s = e.getSource()->copyText(); cout << s << endl; }


The documentation for this class was generated from the following files:
Generated on Sat Feb 21 23:28:21 2004 for Ubit[Eric.Lecolinet@enst.fr] by doxygen 1.3.5