Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Field gadget class. More...
#include <ilviews/dataccess/gadgets/tblcombo.h>
Public Member Functions | |
IliScrolledComboBox (IlvDisplay *display, const IlvRect &rect, const char *label, const char *const *labels=0, IlUShort count=0, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
IliScrolledComboBox (IlvDisplay *display, const IlvPoint &point, const char *label, const char *const *labels=0, IlUShort count=0, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
virtual IlBoolean | f_externalToInternal () |
Updates the internal value of a field according to its current external representation. | |
virtual const IliValue & | f_getValue (IlBoolean internalP=IlFalse) const |
Returns the value of the field. | |
virtual void | f_internalToExternal () |
Updates the external representation of the field and its display according to its current internal value. | |
virtual IlBoolean | f_isConsistent () const |
Returns IlTrue if the internal value of the field corresponds to its current external representation. | |
virtual IlBoolean | f_isReadOnly () const |
Returns IlTrue if the field is read-only. | |
virtual void | f_setForeignDisplayColumnName (const char *) |
Sets the name of the column of the foreign table that will serve as a result, when the table is used as a map to convert internal values into external representations. | |
virtual void | f_setForeignTable (IliTable *, IlBoolean owner=IlFalse) |
Sets the foreign table of the field. | |
virtual void | f_setForeignValueColumnName (const char *) |
Sets the name of the column of the foreign table that will serve as a key, when the table is used as a map to convert internal values into external representations. | |
virtual void | f_setReadOnly (IlBoolean) |
Sets the read-only property for the field. | |
virtual IlBoolean | f_setValue (const IliValue &, IlBoolean internalP=IlFalse) |
Sets the value of the field. |
Field gadget class.
Library: dbgadget
The IliScrolledComboBox
class defines a combo box gadget that opens a pull-down menu when the user clicks on the combo button. The pull-down menu displays a column of the foreign table of the field. A IliScrolledComboBox
gadget inherits the following properties from the IliFieldItf
class:
value column
display column
When a table combo box receives a new value, it looks in the foreign table for a row that has this value in what is referred to as its value column
. If such a row is found, the table combo box displays the value contained in what is referred to as the display column
of this row. Therefore, a table combo box does not display the new value, but a value which is derived from the initial value through the foreign table. The foreign table serves as a value converter. In addition, if the user edits the value displayed in the table combo box, the edited value is converted back in a reversed version of the procedure described above. A row that contains the newly edited value in its display column is searched for in the foreign table. If such a row is found, the value of the combo box changes to the value contained in the value column of the row. Under Windows, this gadget supports XP look&feel.
IliScrolledComboBox::IliScrolledComboBox | ( | IlvDisplay * | display, | |
const IlvPoint & | point, | |||
const char * | label, | |||
const char *const * | labels = 0 , |
|||
IlUShort | count = 0 , |
|||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the class IlvScrolledComboBox
. The size of the combo box is computed from the label parameter. If you want to give the combo box a specific size, use the other constructor.
display | The connection to the display. | |
point | The position of the combo box. | |
label | The label of the combo box. | |
labels | An array containing the predefined labels of the combo box. | |
count | The number of elements in the labels array. | |
thickness | The thickness of the combo box. | |
palette | The palette used by the combo box. |
IliScrolledComboBox::IliScrolledComboBox | ( | IlvDisplay * | display, | |
const IlvRect & | rect, | |||
const char * | label, | |||
const char *const * | labels = 0 , |
|||
IlUShort | count = 0 , |
|||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the IlvScrolledComboBox
.
display | The connection to the display. | |
rect | The size and position of the combo box. | |
label | The label of the combo box. | |
labels | An array containing the predefined labels of the combo box. | |
count | The number of elements in the labels array. | |
thickness | The thickness of the combo box. | |
palette | The palette used by the combo box. |
virtual IlBoolean IliScrolledComboBox::f_externalToInternal | ( | ) | [virtual] |
Updates the internal value of a field according to its current external representation.
IlTrue
if successful and IlFalse
otherwise. Note that this may fail due to the fact that not all external representations can be converted to a value object. For example, this is especially true for text fields that are used to edit numeric or date values. Reimplemented from IliFieldItf.
virtual const IliValue& IliScrolledComboBox::f_getValue | ( | IlBoolean | internal = IlFalse |
) | const [virtual] |
Returns the value of the field.
internal | If IlTrue , the returned value does not necessarily reflect the state of the field as the user sees it. |
Reimplemented from IliFieldItf.
virtual IlBoolean IliScrolledComboBox::f_isConsistent | ( | ) | const [virtual] |
Returns IlTrue
if the internal value of the field corresponds to its current external representation.
A return value of IlFalse
means that the external representation of the field has been edited by the end-user since the last time one of the member functions, f_setValue
, f_externalToInternal
, f_internalToExternal
or f_complete
was successfully called.
IlTrue
if the internal value of the field corresponds to its current external representation. Reimplemented from IliFieldItf.
virtual IlBoolean IliScrolledComboBox::f_isReadOnly | ( | ) | const [virtual] |
Returns IlTrue
if the field is read-only.
IlTrue
if the field is read-only. Reimplemented from IliFieldItf.
virtual void IliScrolledComboBox::f_setForeignDisplayColumnName | ( | const char * | name | ) | [virtual] |
Sets the name of the column of the foreign table that will serve as a result, when the table is used as a map to convert internal values into external representations.
name | The column name. |
Reimplemented from IliFieldItf.
virtual void IliScrolledComboBox::f_setForeignTable | ( | IliTable * | tbl, | |
IlBoolean | owner = IlFalse | |||
) | [virtual] |
Sets the foreign table of the field.
tbl | The table. | |
owner | Determines whether the field will own the table. |
Reimplemented from IliFieldItf.
virtual void IliScrolledComboBox::f_setForeignValueColumnName | ( | const char * | name | ) | [virtual] |
Sets the name of the column of the foreign table that will serve as a key, when the table is used as a map to convert internal values into external representations.
name | The column name. |
Reimplemented from IliFieldItf.
virtual void IliScrolledComboBox::f_setReadOnly | ( | IlBoolean | flag | ) | [virtual] |
Sets the read-only property for the field.
flag | The read-only flag. |
Reimplemented from IliFieldItf.
virtual IlBoolean IliScrolledComboBox::f_setValue | ( | const IliValue & | val, | |
IlBoolean | internal = IlFalse | |||
) | [virtual] |
Sets the value of the field.
val | The value. | |
internal | If IlFalse , then the external representation and the display of the field are automatically updated. |
IlTrue
if successful, and IlFalse
otherwise. Reimplemented from IliFieldItf.
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.