[pygtk] Proportional column width in a TreeView

Joaquin Sargiotto joaquinsargiotto_2 at hotmail.com
Wed Mar 11 10:53:34 WST 2009


What you are proposing is to set the size of the treeview but the thing is that I would like the treeview to resize with the window and the columns to mantain the visual distribution (horizontally).

What I want is similiar to the html tag "td" in "table". If you put 80% on its width, the column will shrink or grow to maintain the proportion when the window is resized.

Is there any way to do this or I will have to process the signal when the treeview gets resized and then change the width of the column??

Date: Tue, 10 Mar 2009 13:36:08 -0500
Subject: Re: [pygtk] Proportional column sizes in a TreeView
From: aleksandr.goretoy en gmail.com
To: joaquinsargiotto_2 en hotmail.com
CC: pygtk en daa.com.au

use set_size_request() on treeview to prevent it from resizing when window does.....I haven't tested it, but it should work
-Alex Goretoy
http://www.goretoy.com





On Sun, Mar 8, 2009 at 2:57 PM, Joaquin Sargiotto <joaquinsargiotto_2 en hotmail.com> wrote:






Hi everyone! I was wondering... is there any way to make the width of the columns proportional to the size of the TreeView. (e.g. 1st col=80%, 2nd col=5%, 3rd=15%)??
The situation is this: I have a TreeView with 2 columns each have its own CellRenderer (I made them). When the window is resized so is the TreeView on it, but the first column maintains the same width and the second column fills the new space if the window is bigger or get smaller if the window is smaller too. What I want is make the columns to keep the same aspect no matter what size the window is (I'm not worried about getting the columns too small because I've set the minimun size for the window).

I am sorry if the question is too noob, but I can't find the answer into the reference doc.
Thanks!

El nuevo Messenger es más personalizable que nunca ¡Conocelo y conseguí el tuyo!


_______________________________________________

pygtk mailing list   pygtk en daa.com.au

http://www.daa.com.au/mailman/listinfo/pygtk

Read the PyGTK FAQ: http://faq.pygtk.org/


_________________________________________________________________
¿Querés saber cómo va a estar el clima mañana? Ingresá ahora a MSN
http://tiempo.ar.msn.com/
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090310/2a6936ae/attachment.htm 


More information about the pygtk mailing list