Questions tagged [pygtk]

PyGTK is the Python binding for the GTK+ widget library.

PyGTK lets you easily create programs with a graphical user interface using the Python programming language and the GTK+ library. GTK+ provides all kinds of visual elements and utilities, and is the official toolkit of the GNOME Desktop.

PyGTK applications are multiplatform and able to run, unmodified, on Linux, Windows, MacOS X and other platforms.

For more information, see the Wikipedia page of PyGTK.

2238 questions
0
votes
2 answers

Cannot import pygtk in pythonbrew after manual install

Since it is impossible to install pygtk via pip I tried to install it manually. I downloaded the source tar from pypi and ran ./configure --prefix=/home/user/.pythonbrew/pythons/Python-2.7.2 make make install It installed alright, e.g. pygtk-demo…
musiKk
  • 14,751
  • 4
  • 55
  • 82
0
votes
1 answer

PyGTK button event

I am trying to connect an event to a button and could not figure out what is wrong with my codes. Below are the source codes. import sys import os importStatus = False try: import pygtk pygtk.require('2.0') import gtk importStatus…
thotheolh
  • 7,040
  • 7
  • 33
  • 49
0
votes
2 answers

PyGTK TextView problems

I have two problems regarding the TextView widget for PyGTK. How do I dictate the size of the TextView and how do I simply get and insert text (not just set text) into TextView ? Below is my source code: import sys importStatus = False output =…
thotheolh
  • 7,040
  • 7
  • 33
  • 49
0
votes
1 answer

faster redraw of pygtk drawing area?

I'm creating a paint program based on this program. Dragging the mouse faster results in spotty brush strokes, so I'm wondering if there is a faster way to redraw the drawing area. This is the current redraw function. It is already utilizing…
Claire
  • 209
  • 3
  • 8
0
votes
1 answer

X11 errors with pygtk on Mac OS X 10.5.8

I have a python program that implements pygtk for GUI. I have it running successfully on some MAC computers running os 10.6.*, after installing pygtk with macports. I have just installed pygtk on a mac 10.5.8 system. When I execute the program I…
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
0
votes
1 answer

Is it the best way to handle several ComboBoxes in Python GTK+?

I am trying to write some configuration GUI, which as many GUIs got two or more ComboBoxes, and other stuff. I don't like copying stuff and making it everywhere the same, long, and hardly readable. I wanna ask you about your own word in that…
Camelek
  • 21
  • 2
0
votes
2 answers

How to resize gtk.gdk.Pixmap

I am created an instance of gtk.gdk.Pixmap, and painted on it something. For example: pixmap = gtk.gdk.Pixmap(widget.window,100,800) pixmap.draw_rectangle(gc, True, 0, 0, 100, 800) pixmap.draw_line(gc, 0, 0,100, 800) How can I to resize the Pixmap?…
Habibutsu
  • 592
  • 1
  • 8
  • 20
0
votes
1 answer

GTK comboBox flowing to fill vertical space in toolbar

I'm building a toolbar in PyGTK and attaching a combo box to it. The result that I got is that the combo box stretches to fill all the vertical space available: I have been trying every trick in the book that I can think of in order to avoid it,…
Ender
  • 529
  • 1
  • 3
  • 14
0
votes
1 answer

PrintOperation force unix dialog?

Is it possible to force GTK to use unix print dialog instead of platform native one?
Marin
  • 1,311
  • 16
  • 35
0
votes
1 answer

attaching mouse click signal in cairo

I was wondering whether it is possible to attach the mouse click signal to a cairo object. Let us suppose I have 3 circles on a drawing, all separate objects. I would then like to change the colour of the ones on which I click. I guess, I could just…
v923z
  • 1,237
  • 5
  • 15
  • 25
0
votes
1 answer

Redraw events lost?

I've got a pygtk app which uses gtk print_run_page_setup_dialog. For some reason, some widgets (siblings to button that invoked the dialog) are no more redrawn after closing this dialog. Forcibly calling queue_draw on them works fine. I'd like to…
Marin
  • 1,311
  • 16
  • 35
0
votes
1 answer

What is the PyQt4 equivalent of GTK set_keep_above(True) method?

I would like to keep the PyQt4 window above like I do with GTK with set_keep_above(True). Is that possible ? Edit 20111101 : this is my code, I don't know how to force the window "above" : #!/usr/bin/python2 # -*- coding: utf8 -*- import os, sys,…
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223
0
votes
1 answer

Python Gedit plugin with GTK, tree store filter runtime recursion error

I have a problem writing a gedit plugin in python, using PyGTK. The basic job of the plugin is to filter a tree store basing the text typed in a text entry. The search is a 'live' search, that is, there are no button to press, the search is…
Luca Faggianelli
  • 2,032
  • 20
  • 23
0
votes
2 answers

PyGtk equivalent of gdk_window_ensure_native?

Is there an equivalent to gdk_window_ensure_native in PyGtk? I need it to unbreak drawing OpenGl to widget in Gtk >= 2.18.
Marin
  • 1,311
  • 16
  • 35
0
votes
1 answer

Can I make a scrolledwindow in Glade without a child?

I have a scrolledwindow as part of an application I've designed in Glade. I don't want to create the child object in Glade though, I want to create it and add it in the code directly. When I try to do this though, I get a weird result where the…
Kris Harper
  • 5,672
  • 8
  • 51
  • 96