Re: passing -1 to gtk_combo_box_set_active behaves different than docs state
- From: Owen Taylor <otaylor redhat com>
- To: Christian Neumair <chris gnome-de org>
- Cc: gtk-devel-list gtk org
- Subject: Re: passing -1 to gtk_combo_box_set_active behaves different than docs state
- Date: Sat, 13 Mar 2004 10:10:48 -0500
On Sat, 2004-03-13 at 05:26, Christian Neumair wrote:
> I've attached a sample that demonstrates that gtk_combo_box_set_active
> selects the last item in the ComboBox if -1 is passed. [1] states that
> -1 tells the ComboBox to have no active item at all. Is there any way to
> select nothing at all (empty ComboBox, user can select an entry)?
> I can verify this problem with custom cell renderers as well.
Actually, it's working correctly, just displaying oddly - what happens
is that the same CellRenderer is used for the menu items and for
the main combo box display.
There is no way to "clear" a cell renderer, so if there is no active
row the main display will just show the contents of the last menu
item.
This means that for a normal combo box, the -1 state isn't useful
as something to display to users, it's just useful as a temporary
internal state for programmers; for something like GtkComboBoxText
it works fine.
The plan we have here is to gtk_widget_hide() the main GtkCellView
for the -1 state, but I don't think we are going to get to that
for 2.4.0. Hmm. No, bugzilla entry. /* ... enters.... */
http://bugzilla.gnome.org/show_bug.cgi?id=137066
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]