Problem with a GtkScrolledWindow



Hi,

I'm using a GtkVBox widget inside a GtkScrolledWindow widget. In this gtkvbox
there ara many GtkCheckButtons. if I scroll the window with a mouse, it do
the correct scrolling but when the scrolling is done with the keyboard it
don't work, the window don't stay syncronized with the gtkvbox.

if someone could help me, i would thank

the code:

        GtkWidget *swin;
        GtkWidget *check;
        gint i;

        swin = gtk_scrolled_window_new (NULL, NULL);
        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

        vbox2 = gtk_vbox_new(FALSE, 0);
        gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW(swin), vbox2);
        
         for(i=0;i<10;i++)
         {
	 check = gtk_check_button_new_with_label("teste"); 
              gtk_box_pack_start(GTK_BOX(vbox2), check, TRUE, TRUE, 0);
         }
        gtk_widget_show_all(vbox2);	
        gtk_widget_show(swin);                                    

Fabiano Fantini Vitale <ffv conectiva com br>
Conectiva S.A.




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