getting gtkcombo selected item
- From: "Timothy I. McGinnis" <tmcginnis synertechsystems com>
- To: gtk-list redhat com
- Subject: getting gtkcombo selected item
- Date: Tue, 10 Aug 1999 07:16:28 -0500
I'm sorry folks, but I am rather confused at the moment.
I have a combo box with items in it. I am trying to get a pointer to the
currently selected item, not the entry for the combo box, but the currently
selected item. I want to be able to change this item in the combo box drop
down without having to read
through the entire list and re-assign it using the popdown_strings
function. (if this is even possible)
Now the list member of the gtkcombo structure is created as a GtkList
widget. The GtkList widget contains a member called selection which is a
pointer to a GList. I am assuming that selection contains the item which
has been selected in the combo box and is now displayed in the entry field
of the combo box, is this a correct assumption (I am assuming that this
could contain several selected items but for my situation I will only be
selecting one). If so, why cant' I just assign combo->selection->data to a
pointer to get the pointer to the item text? When ever I try this and do a
printf to see if I have the right item I get garbage.
What am I assuming incorrectly?
TIA
Tim M.
newbie of all newbies
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]