pygtk

gtk: get width a TreeViewColumn would like to be if it were autosized

Is there a way to get the width, in pixels, that a gtk.TreeViewColumn would want to be if the sizing mode was set as gtk.TREE_VIEW_COLUMN_AUTOSIZE, even if it's currently gtk.TREE_VIEW_COLUMN_FIXED? ...

Passing user data with glade/gtkbuilder

Hi all, I am a newbie of glade/pygtk. I am doing with some radio menu items. I created a signal handler on the signals tab, handler: on_group_menu_change user data: 7 what I expected is pass the int(or str) value 7 as user param to the handler. However, at startup, I found such warning: Could not lookup object 0 on signal gro...

PyGtk Program is not responding on Windows

Hello everybody! I just managed to get py2exe work on a Windows Virtual Machine but stumbled on another problem which I didn't have right after I installed GTK, Pango, Gobject etc. on that machine: When I launch a Python Script the window appears but it immediately stops responding. This happens too if I open a python interpreter and t...

pygtk FileChooserDialog slows down interpreter

I'm trying to use FileChooserDialog to get a native gnome dialog box in a python script. After the script executes, my ipython -pylab prompt experiences a significant slow down. This problem also exists from a plain python prompt. I've isolated the problem to the dialog box. The following example (which has been posted elsewhere as a...

Does pygtk support absolute positioning?

I just want to put an Image on a screen given the X and Y. ...

pygtk - update a gtk.liststore adds blank line

I'm having issue with adding extra lines to gtk.liststore. below is a snipped of the code. The glade definition can be found here. When I add a row the row seperators appear but where text should appear i keeps empty... please help define everything with glade interface designer. class GTKInterface(gobject.GObject): __gsignals__ = { ...

How to iterate over two lists - python

Hey guys. I'm trying to do something in pyGTk where I build a list of HBoxes: self.keyvalueboxes = [] for keyval in range(1,self.keyvaluelen): self.keyvalueboxes.append(gtk.HBox(False, 5)) But I then want to run over the list and assign A text entry & a label into each one both of which are stored in a list. I'm sorry I'm not bei...

GTK window hints

I'm trying to get a window to cover the whole screen. Its positioning and dimensions is fine but it gets covered by the Gnome panel. To complicate things I have two monitors and this app needs to support people with multiple screens. WINDOW_TYPE_HINT_SPLASHSCREEN is a good start. It covers both screens but not the panel. It's still ther...

How can I properly read out spin buttons in pyGTK?

For a small timer app I want to write a GTK interface where I can set the desired time. Here is a picture of the interface: However, I am having trouble reading out the fields of the spin buttons. My envisaged procedure for this is the following: Read out the buttons using methods for each button Here is one of the methods that d...

What is the most popular GUI library for Python in Windows ?

What is the most popular GUI library for Python in Windows ? ...

Pygtk and segmentation fault

Why I get this segmentation fault?: >>> import gtk >>> a = gtk.Window() >>> a.show() >>> b = gtk.Dialog("hellooo") >>> b.show() # here the dialog appears >>> b.show() Segmentation fault ...

Prevent Treeview cursor change

Hi all, I have a gtk.Treeview setup as a drag source: self.drag_source_set(gtk.gdk.BUTTON1_MASK, targets, gtk.gdk.ACTION_COPY) and it's TreeSelection is set to SELECT_MULTIPLE. But everytime I try to drag a multi row selection, the cursor jumps to the current mouse position, resetting the selection to the current row. Even though the...

How to call a function in a pyGTK timeout?

When I try to call a function using a timeout in pyGtk, I receive the error message TypeError: second argument not callable. All I want to do is call a very simple function from within the time out. To illustrate my proble, I have simply prepared the function do_nothing to illustrate my problem. def do_nothing(self): return True # ...

Pygtk: Name is not defined

I'm trying out a few pygtk tutorials and have run across a seemingly obvious newbie mistake, but for the life of me can't figure out what's going on here. The error: Traceback (most recent call last): File "main.py", line 8, in class Base: File "main.py", line 61, in Base cv.set_line_width(9) NameError: name 'cv' is not ...

PyGtk - Activating a combo box

If I have a combo box in pyGTK and would like to set a list of strings and then on clicking on one activate a command how would I do it? At the moment I have: self.combo_key = gtk.Combo() self.combo_key.set_popdown_strings(self.keys) self.combo_key.entry.set_text(db.keys()[0]) self.combo_key.entry.connect("activate", se...