Re: Re: why is GtkOptionMenu deprecated?

Hi, sorry that I didn't explain exactly what I want, but I need to pack
widgets like GtkVScale into a GtkOptionMenu and I can't find a cell
renderer for widgets and I believe that there isn't one for widgets. So
my question was why is GtkOptionMenu deprecated and what could I do
better when I implement my own?
Assumed there will be a way by using GtkComboBox, please show me the
missing code below.

GtkWindow *window;
GtkComboBox *combo_box;
GtkVScale *vscale;
GtkListStore *list_store;
GtkTreeIter tree_iter;

gtk_init(&argc, &argv);

window = (GtkWindow *) gtk_window_new(GTK_WINDOW_TOPLEVEL);

list_store = gtk_list_store_new(1, GTK_TYPE_VSCALE);

vscale = (GtkVScale *) gtk_vscale_new_with_range(0.0, 1.0, 0.1);
gtk_widget_set_size_request((GtkWidget *) vscale, -1, 100);
gtk_list_store_append(list_store, &tree_iter);
gtk_list_store_set(list_store, &tree_iter, 0, vscale, -1);

combo_box = (GtkComboBox *)

gtk_container_add((GtkContainer *) window, (GtkWidget *) combo_box);
gtk_widget_show_all((GtkWidget *) window);

/* here is missing a renderer */

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]