layout won't scroll
- From: yanxin <ycui wmsvision com>
- To: gtk-app-devel-list gnome org
- Subject: layout won't scroll
- Date: Fri, 18 Oct 2002 18:25:16 -0700
I created a scrolled window and put layput in. But when I scroll the
vertical bar, the contents won't scroll. What could be the root of the
problem?
Here is my code:
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwindow1);
gtk_container_add (GTK_CONTAINER (eventbox1), scrolledwindow1);
gtk_widget_set_usize (scrolledwindow1, 200, 200);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1),
GTK_POL
ICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
layout1 = gtk_layout_new (NULL, NULL);
gtk_widget_show (layout1);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), layout1);
gtk_layout_set_size (GTK_LAYOUT (layout1), 400, 400);
GTK_ADJUSTMENT (GTK_LAYOUT (layout1)->hadjustment)->step_increment =
10;
GTK_ADJUSTMENT (GTK_LAYOUT (layout1)->vadjustment)->step_increment =
10;
layout6 = gtk_layout_new (NULL, NULL);
gtk_widget_show (layout6);
gtk_layout_put (GTK_LAYOUT (layout1), layout6, 0, 0);
gtk_widget_set_usize (layout6, 400, 400);
GTK_ADJUSTMENT (GTK_LAYOUT (layout6)->hadjustment)->step_increment =
0;
GTK_ADJUSTMENT (GTK_LAYOUT (layout6)->vadjustment)->step_increment =
0;
button1 = gtk_button_new_with_label ("button1");
....
Thanks
Yanxin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]