What Python-related code (PyGTK, Glade, Tkinter, PyQT, wxPython, Cairo, ...) could you easily use to create a GUI to do some or all of the following?
Part of the GUI has an immovable square grid.
The user can press a button to create a resizable rectangle.
The user can drag the rectangle anywhere on the grid, and it will snap to the gr...
I have a fairly large work project that uses pygtk for the GUI and I need reduce the dependencies and convert to tkinter.
Does anyone know of a script to convert exisiting pygtk code to tkinter?
...
I'm having performance problems when inserting many rows into a GTK treeview (using PyGTK) - or when modifying many rows. The problem is that the model seems to get resorted after each change (insert/modification). This causes the GUI to hang for multiple seconds. Leaving the model unsorted by commenting out model.set_sort_column_id(SOME...
Hi, I have a TreeView and when I click in it, i receive the error:
Traceback (most recent call last):
File "pyparty.py", line 76, in get_selected_user
self.selected_user = tree_model.get_value(tree_iter, 0)
TypeError: iter must be a GtkTreeIter
It just happen for the first click. After that it works fine. I don't know what's wro...
hi,
I want to ask how can I erase a line witch I've drawn by using the pyGTK
I used:cairo library
cr = widget.window.cairo_create()
cr.move_to(x, y)
cr.line_to(x1, y1)
cr.stroke()
I want to delete this line after drawing it on screen
...
How do I really disable gtk treeview interactive search? The docs say to set_enable_search(False), but if I do this, CTRL+F still causes an annoying search pop-up to appear. Connecting to start-interactive-search and returning True doesn't work either.
...
Hi, I would like to implement a button "New" that would work the same as File>New in most applications - that is: resets all the labels, treeviews, etc. to the original state.
Thank you, Tomas
...
I have a two-thread application: GUI, and some background work. I'm trying to send requests to the main thread to do GUI updates (move a progress bar), but it doesn't seem to work. I've boiled it down to a really minimal example:
import pygtk
pygtk.require('2.0')
import glib
import gtk
import threading
import sys
import time
def idle(...
Hi, I'm learning PyGTK and I have a parent window and a child window. Inside of a parent window's method, i create the child window and then I refresh a treeview... something like that:
def add_user(self, widget, data = None):
save_user.SaveUser(self.window)
self.load_tree_view()
But, when it's running, the child window appear...
Problem: Widget 'A' is a toplevel window that is displayed after a button click in MainWindow 'B'. How do I assign a handler to handle the signal sent back after the 'X' along the window border of Widget 'A' is clicked (see below for current implementation)?
def on_mainWindow_B_button_clicked(self, widget):
self.widget_a.show()
de...
Hi, I have made an application using Glade and Python and I would like to make several localizations.
I know how to localize strings that are in the Python code, I just encapsule all the strings that are supposed to be localized with _() and than specify the translation of the string in a .po file.
But how do I tell a string that is bu...
With PyGTK running on Windows, I want to have a new window pop up near a parent window, but never off-screen.
I observed the behavior I want in Microsoft Wordpad in both Windows 7 and Windows XP. If you make the window very small and move it to the bottom right of the desktop, right click in the text field, and open the Paragraph menu,...
Hi,
I'm developing a GTK app, and would like to print some messages over existing widgets rather than displaying them in the status bar, kind of like the way Mendeley does it when no document is selected:
(as opposed to what is displayed in the right pane when you select a document:)
Should I dynamically create a panel, label, ......
Hi everybody.
I am working on a gtk+ application written in python. I obviously use pygtk. My application is about collections of videos. It's a kind of F-spo or picasa, but for video.
As you can see in these two apps, you have a central area where you can see all of your photos with tag thumbnails under.
In my app, I want to implemen...
Recently I've started to learn pygtk . As an exercise, I am planing to build a small feed reader. Currently I have the following (working) code:
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
class FeedbarWindow():
prop_file = 'feedbar.prop' #Properties File
menu_bar_ui = """
<ui>
...
how to do, that just a part of GtkLabel has a clicked event and calls a function.
i make a twitter client, witch shows tweets and i would like to, when in the tweet is a # hashtag and i click it, the application shows a new window with search of this #hashtag. and i dont know how to do that just the #hashtag would invoke this event.
so...
Hi,
I'm developing a irc client in python based on irc.IRCClient and pygtk, I'm using the correct reactor and all works fine.
Now I would launch a browser when clicking a Url...
The better choice is to use xdg-open which runs the configured default browser (in a free desktop compliant DE).
The url is picked in a gtk button-press-event....
When I have a gtk.CellRendererText, I can associate its foreground color with one of the tree store's columns, and set the foreground-set attribute to True, to change the color of the text in that column. However, when the row with the colored column is selected, its color disappears, and is the same as any selected cell's color. How do ...
I am trying to fill a treeview with data and checkbuttons. When the treeview is displayed, checkbuttons appear but the text doesn't.
I get the following error:
/home/astrob/programação/pyparty/groups.py:81: GtkWarning: gtk_tree_view_column_cell_layout_add_attribute: assertion `info != NULL' failed
username_treeviewcolumn.add_attribu...
Hello, I'm trying to retrieve the row data from a treemodel when the row_activated callback is fired.
When row_activated is called, the 'path' variable it passes is a tuple. How do I easily use this tuple to retrieve an iter and ultimately the data itself? The treemodel class has a function to convert a string into an iter, but it seems...