Scrolling any Box Widget
- From: Toni Moreno Giménez <toni moreno gimenez wanadoo es>
- To: gtk-list gnome org
- Subject: Scrolling any Box Widget
- Date: Wed, 22 May 2002 19:47:52 +0200
Hi.
I'm doing a test trying to scroll a box, I have seen an example (a GtkText
widget), and I've done the same.
--- GtkText---------
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwindow1);
gtk_container_add (GTK_CONTAINER (info), scrolledwindow1);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1),
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
text1 = gtk_text_new (NULL, NULL);
gtk_widget_show (text1);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), text1);
gtk_text_set_editable (GTK_TEXT (text1), TRUE);
--- A VBox --------
scrolledwindow=gtk_scrolled_window_new(NULL, NULL);
gtk_widget_show (scrolledwindow);
gtk_box_pack_start(GTK_BOX(a bix), box,TRUE,TRUE,0);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (rb->rkWindow),
GTK_POLICY_AUTOMATIC,GTK_POLICY_ALWAYS);
myBox=gtk_vbox_new(FALSE,0);
gtk_container_add (GTK_CONTAINER (scrolledindow), myBox);
gtk_widget_show (myBox);
--------------------
In the first example the text widget expands over the window and scrolls
well, in the second one, the scrolled window seems unknow the VBox Size, and
doesn't show the complete box, only the upper part. The main window resizes
itsef as the complete vbox size but doen't draw it.
What I'm doing wrong? , I would like handle any box ,as the text widget .
Who can do it?
Thanks in advance
--
=================
Toni Moreno Giménez
=================
Pje de las rosas nº 22
Vilassar de Mar
(Barcelona) España
CP: 08340
-----------------
Tel:937598149
Tel: 699706656
-----------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]