RE: GtkTreeView+vscroll in hbox




Hi,

the problem is, in hbox the width of hbox is equally divided for both
treeview and vscroll.
So a huge gap is coming between treeview and vscroll.

This depends upon how did you create your HBOX. If you create it like:

gtk_hbox_new(TRUE, ..); then, all packed widgets will have same width, and
the second arg will decide the spacing between them. In your scenario, you
may want to make it FALSE and spacing arg may be upon your choice.

You may also wish to make the fill arg of gtk_box_pack_start() as FALSE.

May be something like this:

gtk_hbox_new(FALSE,0)
gtk_box_pack_start (GTK_BOX(hbox), treeview, FALSE, FALSE, 0);
 gtk_box_pack_start (GTK_BOX(hbox), vscroll, FALSE, FALSE, 0);

or:

gtk_hbox_new(FALSE,0)
gtk_box_pack_start (GTK_BOX(hbox), treeview, TRUE, FALSE, 10);
gtk_box_pack_start (GTK_BOX(hbox), vscroll, TRUE, FALSE, 10);

Regards,
Siddharth
TATA Elxsi


-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org]On Behalf Of Prasanna Kumar
K
Sent: Friday, August 10, 2007 4:46 PM
To: gtk-app-devel-list gnome org
Subject: GtkTreeView+vscroll in hbox


Hi,

 I want to place one gtktreeview(treeview) and one vertical
scrollbar(vscroll) in one horizontal box(hbox).And at last want to pack this
single horizontal box into a vertical box(vbox).

I have done this coding..

 gtk_box_pack_start (GTK_BOX(hbox), treeview, TRUE, TRUE, 0);
 gtk_box_pack_start (GTK_BOX(hbox), vscroll, TRUE, TRUE, 0);
 gtk_box_pack_start (GTK_BOX(vbox), hbox, TRUE, TRUE, 1);

the problem is, in hbox the width of hbox is equally divided for both
treeview and vscroll.
So a huge gap is coming between treeview and vscroll.
I want treeview to occupy the whole hbox and only a little space should be
left to fit vscroll.
How to do that using horizontal/vertical boxes.

Is there any other container or widgets to get the work done.


Regards,
Prasanna.


This message (including any attachment) is confidential and may be legally
privileged.  Access to this message by anyone other than the intended
recipient(s) listed above is unauthorized.  If you are not the intended
recipient you are hereby notified that any disclosure, copying, or
distribution of the message, or any action taken or omission of action by
you in reliance upon it, is prohibited and may be unlawful.  Please
immediately notify the sender by reply e-mail and permanently delete all
copies of the message if you have received this message in error.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


The information contained in this electronic message and any attachments to this message are intended for the 
exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you 
are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the 
sender immediately and destroy all copies of this message and any attachments contained in it.

Contact your Administrator for further information.



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