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
1 2938
ey all,
I found a possible solution, and I figured I might share it with the rest, somebody might need it in the future. -
...
-
self.screen_with = gtk.gdk.screen_width()
-
self.treeview = gtk.TreeView(self.treestore)
-
self.treecolumn = gtk.TreeViewColumn("Assets")
-
self.treecolumn.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
-
self.treecolumn.set_resizable(True)
-
self.treecolumn.set_fixed_width(self.screen_width / 5)
-
self.treeview.append_column(self.treecolumn)
-
...
-
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 :)
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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,...
|
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'...
|
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
:...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
| | |