Re: Clearing GtkComboBoxEntry
- From: David NeÄas <yeti physics muni cz>
- To: Steve Harrington <steven harrington verizon net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Clearing GtkComboBoxEntry
- Date: Tue, 8 Dec 2009 10:10:32 +0100
On Mon, Dec 07, 2009 at 07:52:02PM -0800, Steve Harrington wrote:
I have an application using GtkComboBoxEntry with a simple 2-column
int/char * ListEntry model. If the user enters data in the box (as
opposed to using a pull-down selector) I can access the index with
gtk_combo_box_get_active( GTK_COMBO_BOX(W) );
and the text with
gtk_combo_box_get_active_text (GTK_COMBO_BOX(W));
The index is -1 as expected and the text is the text that what was entered.
The question is: How do I clear the text field when I have finished
with it.
From the FAQ and other documentation it seems that I should be able to
access the actual GtkEntry widget within the GtkComboBoxEntry widget,
get the GtkEntryBuffer, and clear it with
gtk_entry_buffer_delete_text(). None of these buffer functions/headers
are marked as depreciated but also none of them are my version of the
gtk headers (/usr/include/gtk-2.0/gtk/gtkentry.h) or anywhere else in
the gtk headers.
You can get the entry with gtk_bin_get_child(). At least that's what
the reference docs say.
Yeti
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]