Pygtk, treeview problem in the layout

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • micmast
    New Member
    • Mar 2008
    • 144

    Pygtk, treeview problem in the layout

    Ey all,

    I'm currently working on an application that uses the pygtk libraries to create windows and widgets. I have a HBOX (2 boxes) in the middle and in the left one I have a treeview, in the right the rest (drawingarea, entries, labels, notebooks, ...). But, as usual, the big hbox is divided exactly in the middle and I was wondering if it is possible to make sure that the left hbox doesn't use more then an amount of pixels. I tried looking at the treeview column to limit the width, with no result. I tried settings the width of the hbox, no result.
    I tried creating a layout and put my treeview widget on that, with a fixed height & width, also no result...

    So I just don't know anymore, any help would be nice.

    Thx in advance
  • micmast
    New Member
    • Mar 2008
    • 144

    #2
    ey all,

    I found a possible solution, and I figured I might share it with the rest, somebody might need it in the future.

    [CODE=python]
    ...
    self.screen_wit h = gtk.gdk.screen_ width()
    self.treeview = gtk.TreeView(se lf.treestore)
    self.treecolumn = gtk.TreeViewCol umn("Assets")
    self.treecolumn .set_sizing(gtk .TREE_VIEW_COLU MN_FIXED)
    self.treecolumn .set_resizable( True)
    self.treecolumn .set_fixed_widt h(self.screen_w idth / 5)
    self.treeview.a ppend_column(se lf.treecolumn)
    ...
    [/CODE]

    Afterwards I add the treeview to a hbox, and now the width is fixed, but when I maximize the application, the treeview failes to update the screen. This might be a windows bug, but could also be a problem in general... If somebody has any ideas, fire away :)

    Comment

    Working...