Re: [gtk-list] Beginner's question: Combo widget




>   GtkWidget * dropdown = gtk_combo_new();
>   GList * ddlist = 0;
>   ddlist = g_list_prepend( ddlist, gtk_list_item_new_with_label( "G" ) );
>   ddlist = g_list_prepend( ddlist, gtk_list_item_new_with_label( "B" ) );
>   ddlist = g_list_prepend( ddlist, gtk_list_item_new_with_label( "M" ) );
>   gtk_list_prepend_items( GTK_LIST( GTK_COMBO( dropdown )->list ), ddlist
> );
>   gtk_box_pack_start( GTK_BOX( vb ), GTK_WIDGET( dropdown ),
> 			FALSE, FALSE, 0 );
>   gtk_widget_show( dropdown );
> 
> It shows up on the screen, and, using the keyboard, I can cycle through
> the items in the Combo widget. But if I click the drop down button on the
> right, and empty list show up.

Try doing a gtk_widget_show() on each item you add to the list.

- Dave

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS dpu s-:+ a C++$ ULS++$ P+++$>++++ L++>+++$ E+>++ W N++ !o K w++$ O !M-
!V(-) PS+ PE- Y+ PGP !t-- 5++ X R tv b+ DI+++ D G e++ h--- r+++ y++++
------END GEEK CODE BLOCK------



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