c - Wrap GtkComboBox column-wise instead of row-wise -
i'm having trouble wrap gtkcombobox large number of alphabetically sorted entries column-wise instead of row-wise.
please have @ following minimal working example , attached screenshot idea of i'm trying achieve. focal point of code function gtk_combo_box_set_wrap_width
wraps gtkcombobox table (see gtk3 api reference).
#include <gtk/gtk.h> int main(int argc, char *argv[]) { gtkwidget *window; gtkwidget *combobox; gtk_init(&argc,&argv); window = gtk_window_new(gtk_window_toplevel); gtk_container_set_border_width(gtk_container(window), 10 ); gtk_window_set_default_size(gtk_window(window), 100, 50); combobox = gtk_combo_box_text_new(); gtk_combo_box_text_append(gtk_combo_box_text(combobox), null, "a" ); gtk_combo_box_text_append(gtk_combo_box_text(combobox), null, "b" ); gtk_combo_box_text_append(gtk_combo_box_text(combobox), null, "c" ); gtk_combo_box_text_append(gtk_combo_box_text(combobox), null, "d" ); gtk_combo_box_set_wrap_width (gtk_combo_box(combobox), 2); gtk_container_add(gtk_container(window), combobox); gtk_widget_show_all(window); gtk_main(); return(0); }
this gives me following output:
as can see, entries wrapped row-wise, i.e. read left right.
is there convenient way wrap elements column-wise without re-sorting them accordingly?
Comments
Post a Comment