[pygtk] Newbe question .. Selecting the size of a gtk.Table column

A.T.Hofkamp a.t.hofkamp at tue.nl
Mon Oct 9 20:27:52 WST 2006


Paul Borghese wrote:
> Hi,
> 
> I have a question and would like to appologize ahead of time for it being
> very basic.
> 
> I am building an application using the notebook widget.  Inside the 
> notebook
> is a tab I would like to divide into two columns using gtk.Table.  The
> column on the left is a gtk.TreeView, where an item selected on the 
> TreeView
> will be viewed by the right column.  Think of how Evolution or Outlook is
> designed.  The problem I am having is the treeview column seems to take
> exactly 1/2 of the total space.  When creating the table I have selected
> "homogeneous" as False.  I would like to specify the treeview column is
> limited to a set number of points.  Is that possible?

I'd expect that.

However, stating to the packer that it may have columns with unequal width is 
not enough, you also need to state the minimal or maximal width of at least 
one of the columns.
(It is a bit like an assignment to divide the space on a blackboard in two 
columns. Without further information about allowable width of the columns, the 
best you can do is split the board in half.)

Requesting for a size of a widget is done with 
"set_size_request(width,height)", which is a method of the base class 
gtk.Widget. Note that you have no garantuee that you get what you ask for (it 
depends on what you ask, and how much space is available for the window).


Albert


More information about the pygtk mailing list