I have a PyGTK program which is hidden most of the time, but with a keypress it shall come up as a popup. Therefore I want the program not to be activated when its opened. I tried several options to to that, with no success:
self.window.show()
self.window.set_focus(None)
Activates the program, but sets no focus.
self.wi...
I finally managed to change the background of a textview widget in pygtk. Turns out I needed to use the widget.modify_base(gtk.STATE_NORMAL, gtk.gdk.Color(0, 0, 0, 0)) That results in the desired black background.
Now, the rest of the problem... Now I want to change the text color to white.
I have tried everything including widget.modi...
I've got key-press-event handler and i need to determine which kind of key was pressed: modifier or not?
It's not in event.state, because this field works only when modifier was pressed with something else, but i need this for single key (i.e. simply pressing control or alt, ...).
...
Using Python and PyGTK I've got a GtkMenu with various GtkCheckMenuItems in it. When the user clicks one of the checkboxes the menu closes. I'd like for the user to be able to check a series of checkboxes without the menu closing each time.
I've looked at using the activate callback to show the menu but this doesn't seem to work. Any ...
I'm trying to write a simple gui-based application in pygtk which provides 'live' previewing of text-based markup. The markup processing, however, can be quite computationally expensive and slow to run, so updating the preview on every keystroke is not really viable. Instead I'd like to have the update run only when user input lapses. ...
My program draws circles moving on the window. I think I must be missing some basic gtk/cairo concept because it seems to be running too slowly/stutteringly for what I am doing. Any ideas? Thanks for any help!
#!/usr/bin/python
import gtk
import gtk.gdk as gdk
import math
import random
import gobject
# The number of circles and the w...
Hi,
I'm writing a program and I need some extra functionality from the gtk.Notebook widget, so I have taken to creating my own.
My only problem is styling my tabs so that they look like the tabs in gtk.Notebook and will change according to the user's theme.
I really don't know where to start so any advice would be much appreciated, th...
Hi.
i'm creating a dialog that finds out what is focused element.
that's what i wrote:
import gtk
import gobject
class FocusedElementPath(gtk.Dialog):
def __init__(self, parent, title=None):
gtk.Dialog.__init__(self, title or 'Show path', parent)
self.catch_within = parent
self.catch_focus = True
...
Hi there.
I need to build a native windows app using Python (and py2exe, I guess).
Feature requirements are:
Taskbar icon
Alert notifications (next to Taskbar Icon)
Chromeless window (ideally a pretty, rounded, coloured one).
Webkit to render some of the Chromeless window
So far I've identified the following possible toolkits:
pyG...
self.button = gtk.Button(stock=gtk.STOCK_DELETE)
Only Shows:
Delete
...
I'm adding two icons to a gtk.Entry in PyGTK. The icons signals are handled by the following method
def entry_icon_event(self, widget, position, event)
I'm trying to differentiate between the two of them:
<enum GTK_ENTRY_ICON_PRIMARY of type GtkEntryIconPosition>
<enum GTK_ENTRY_ICON_SECONDARY of type GtkEntryIconPosition>
How can ...
Basically, what I want to do is put some buttons before the tabs in a gtk.Notebook. I tried making my own notebook type widget and it worked well, but it would have required lots more work to make it as flexible as I would like, also it wasn't as efficient.
Here is a mock-up of what I'm trying to achieve: http://imagebin.ca/view/84SC0d....
I'm trying to write a small gui app in pygtk which needs an html-rendering widget. I'd like to be able to use it in a windows environment.
Currently I'm using pywebkitgtk on my GNU/Linux system, and it works extremely well, but it seems it's not possible to use this on Windows at this time.
Can anyone give me any suggestions on how to...
I'm making an app using GTKMM and I want to know how to catch the right click signal from a Gtk::Table ?
And also how to catch if the Mouse is over a Gtk::Table ?
...
I'm building a small PyGTK application and I have an text input field (currently a ComboBoxEntry) which is populated with a few values that the user should be able to choose from.
I think what I want to do is to filter out the matching fields and only show those ones so the user using the keyboard arrows can choose one of the matching o...
How can I determine idle time in Python on Linux, meaning no keyboard or mouse activity for the past few seconds or minutes? All present links tell how to do it on windows but not on Linux.
...
I have a treeview and I am watching for the cursor-changed and row-activated signals. The problem is that in order to trigger the row-activate I first have to click on the row (triggering cursor-changed) and then do the double click, requiring 3 clicks.
Is there a way to respond to both signals with 2 clicks?
...
I am writing a timer program in Python using PyGTK. It is precise to the hundredths place. Right now, I am using a constantly updated label. This is a problem, because if I resize the window while the timer is running, Pango more often than not throws some crazy error and my program terminates. It's not always the same error, but differe...
Hi to all. I have notebook on my form and on each notebook's tab i have gtk.TextView. textview adding automaticaly when new notebook's tab add. Let's say I want to open a file in 3 textview into 3 tabs and when i open file i want that in tab-label will be file path.
Tab add:
def new_tab(self):
scrolled_window = gtk.ScrolledWindow(...
Hi to all. I have menu on my form and gtktextview:
I create imageitemmenu:
self.file_new = gtk.ImageMenuItem(gtk.STOCK_NEW, agr)
key,mod = gtk.accelerator_parse("N")
self.file_new.add_accelerator("activate", agr, key, mod,gtk.ACCEL_VISIBLE)
But when i press n in textview at this time triggered file_new menu
activate... How ca...