473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Pygtk, treeview problem in the layout

micmast
144 100+
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
Dec 8 '08 #1
1 2938
micmast
144 100+
ey all,

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

Expand|Select|Wrap|Line Numbers
  1. ...
  2. self.screen_with = gtk.gdk.screen_width()
  3. self.treeview = gtk.TreeView(self.treestore)
  4. self.treecolumn = gtk.TreeViewColumn("Assets")
  5. self.treecolumn.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
  6. self.treecolumn.set_resizable(True)
  7. self.treecolumn.set_fixed_width(self.screen_width / 5)
  8. self.treeview.append_column(self.treecolumn)
  9. ...
  10.  
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 :)
Dec 9 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Andre Lerche | last post by:
Hi list, I am quite new to Python and try to learn Python with a small pygtk program. I am facing a problem which I am unable to solve for myself. I think I have read the documentation and some...
2
by: Samuele Giovanni Tonon | last post by:
hi, i'm trying to develop a trivial application which random copy files from a directory to another one. i made it using pygtk for the graphical interface, however i find some problem with...
0
by: Franck Pommereau | last post by:
Hi all, I'm building a PyGTK interface in which I would like that no widget would be able to get the focus (and so to be activated by pressing the Return key). For this purpose, for each widget,...
22
by: dcrespo | last post by:
Hi all... I think wxPython is much better than PyGTK. First of all, PyGTK needs the GTK runtime installed, whereas wxPython is entirely Python's modules, so It facilitates the apps'...
0
by: manatlan | last post by:
Hello, I'm new to pygtk (but i know wxpython very well) I'm trying to play with this example : http://www.pygtk.org/pygtk2tutorial/sec-CellRenderers.html#filelistingfig (the code is here :...
2
by: Tim N. van der Leeuw | last post by:
I tried to create a windows executable of a pygtk program. My first attempt worked, kinda, except that no themes were applied and no readable fonts were found by pango; so all letters where just...
0
by: Chris Johnson | last post by:
Good morning. I have recently begun a project using PyGTK, and part of my planned interface has a gtk.TreeView showing a portion of the filesystem. Now, rather than load the entire FS structure...
0
by: Fabian Braennstroem | last post by:
Hi, I am just testing pygtk/glade out and wonder, if I am able to change the keybindings. E.g. the treeview searches by default for the entries beginning with the typed keystroke; moving to the...
1
by: Guillermo Heizenreder | last post by:
Hi list I'm developing a application for learn pygkt, and I need to know when a user selected or clicked one determinate row of my TreeView for shot another signal . Study the tutorial I began...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.