![]() | ![]() | ![]() | GNOME-DB API reference | ![]() |
---|
GtkWidget * gnome_db_combo_new (GdaRecordset *recset,gint pos);gboolean gnome_db_combo_get_editable (GnomeDbCombo *dbcombo); void gnome_db_combo_set_editable (GnomeDbCombo *dbcombo,gboolean editable); void gnome_db_combo_refresh (GnomeDbCombo *dbcombo);gint gnome_db_combo_get_row_count (GnomeDbCombo *dbcombo);gchar * gnome_db_combo_get_string (GnomeDbCombo *dbcombo);GdaRecordset * gnome_db_combo_get_recordset (GnomeDbCombo *dbcombo); void gnome_db_combo_set_recordset (GnomeDbCombo *dbcombo,GdaRecordset *recset,gint pos); void gnome_db_combo_sync (GnomeDbCombo *dbcombo);
The GnomeDbCombo widget is a normal combo box widget with the addition
of being data bound. That is, you can associate a
This widget is specially useful for data entry screens.
GtkWidget * gnome_db_combo_new (GdaRecordset *recset,gint pos);
Creates a new GnomeDbCombo widget. You can optionally specify a GdaRecordset object which will be used by the GnomeDbCombo widget
recset : | recordset to be shown |
pos : | position of the field being shown |
Returns : | a pointer to the new widget, or NULL on error |
gboolean gnome_db_combo_get_editable (GnomeDbCombo *dbcombo);
Gets the editing mode for the given GnomeDbCombo widget.
dbcombo : | the GnomeDbCombo widget |
Returns : | TRUE if the combo box is editable , or FALSE if not |
void gnome_db_combo_set_editable (GnomeDbCombo *dbcombo,gboolean editable);
Sets the editing mode for the given GnomeDbCombo widget. When the editing mode is set to TRUE, it means that users can type on the combo entry widget, thus making this widget useful for data entry screens where you want users to be able to make modifications.
dbcombo : | a GnomeDbCombo widget |
editable : | whether to let (TRUE) or nor let (FALSE) editing |
void gnome_db_combo_refresh (GnomeDbCombo *dbcombo);
Refreshes the data being displayed by the given GnomeDbCombo widget. This means that the same query is executed on the connection associated with this combo widget.
dbcombo : | a GnomeDbCombo widget |
gint gnome_db_combo_get_row_count (GnomeDbCombo *dbcombo);
Returns the number of rows being currently displayed by the given GnomeDbCombo widget.
dbcombo : | a GnomeDbCombo widget |
Returns : | the number of rows |
gchar * gnome_db_combo_get_string (GnomeDbCombo *dbcombo);
Returns the current selection in the given GnomeDbCombo widget as a string.
dbcombo : | a GnomeDbCombo widget |
Returns : | the currently selected item's string |
GdaRecordset * gnome_db_combo_get_recordset (GnomeDbCombo *dbcombo);
Gets the
dbcombo : | a GnomeDbCombo widget |
Returns : | the |
void gnome_db_combo_set_recordset (GnomeDbCombo *dbcombo,GdaRecordset *recset,gint pos);
Associates a
It's important to note that the GnomeDbCombo widget keeps a reference
to the
dbcombo : | a GnomeDbCombo widget |
recset : | the recordset to be shown |
pos : | the column to be shown |
void gnome_db_combo_sync (GnomeDbCombo *dbcombo);
Synchronizes the underlying
This is specially useful for data entry screens, where you can have a list
of all primary keys in a GnomeDbCombo widget, and, when the user selects
an entry in the combo pop-down list, other data entry widgets (such as
dbcombo : | a GnomeDbCombo widget |
<<< GnomeDbBrowser | GnomeDbDataset >>> |