1

I'm referring to the comment by underscore_d given in the context of this question Gtk ComboBox width based on contents:

If you [...] change [the model of a combobox to a new one] with all shorter options... [the combobox] doesn't shrink back down.

I've noticed that myself, and I've tried to shrink the combobox with

gtk_widget_queue_draw (combobox);
while (gtk_events_pending ()) {
   gtk_main_iteration ();
}

but to no avail; other "tricks" like using gdk_threads_add_idle didn't work either.

So there is no way, either by code or by any setting, to shrink an overly wide combobox?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
GTK 1.2.6 fanboy
  • 839
  • 1
  • 5
  • 20

1 Answers1

0

I destroy now the combo box widget and recreate it every time; the size change is quite big and the combo box looks really bulky if I don't do this. Not very elegant, but so be it.

GTK 1.2.6 fanboy
  • 839
  • 1
  • 5
  • 20