In my program, I've got a menu with a group of RadioMenuItem entries. Choosing one of them should trigger a function which can either succeed or fail. If it fails, this RadioMenuItem shouldn't be marked chosen (the previous one should persist).…
I found a couple of tutorials (PyGTK) that use this code:
from gi.repository import Gtk
[...]
self.toolbar = Gtk.Toolbar()
self.toolbar.set_style(Gtk.TOOLBAR_BOTH)
[...]
but using Python3 and GTK3 (PyGobject) I get the…
I would like to expand the Gtk.Scale widgets (they are inside a Gtk.ListBox) and get rid of the indentation of the bottom two. The indentation seems to be connected to the length of the text in the left column.
#!/usr/bin/python3
from…
How can I create an empty row (2 floats) in GTKTreeView? I set up this:
self.liststore = Gtk.ListStore(float, float)
self.treeview = Gtk.TreeView(model=self.liststore)
and then add 3 rows:
self.liststore.append([2.35, 2.40])
…
How can I add icons to a GtkToolbar using PyGObject?
I can create the toolbar and an icon without any problems:
self.toolbar = Gtk.Toolbar()
self.item = Gtk.ToolItem()
But adding the item to the toolbar doesn't seem to work like this (Found…
Can anybody tell me why this example doesn't work when I try to add a float in one of the columns?
It produces a type error (TypeError: Must be number, not str) in the line at the bottom (self.liststorepath = number).
Edit: I narrowed it down. My…
I am trying to create a button that is red instead of the default colour. I am applying the style through a CssProvider() but the button's colour does not change. What am I doing wrong ?
Here is the code:
from gi.repository import Gtk, Gdk
CSS =…
how could i dynamically change the icon of a button created with glade?
______________________ Last Edit _________________________________________
I'm trying this:
self.button_waiting=self.builder.get_object('button_waiting')
…
I would like to find a way to display CSV files on a TextView GTK+3 with Python..
I've tested alot of stuff but i can't make it work
def on_button_program_list2_clicked(self, button, data=None):
self.window_list.show() # this is the window that…
I am beginning to work on a program in which i want multilingual support, but since it is pretty modular (and i want it to be even more in the future), a language change means "destroy what you had of interface and build again with the content which…
after adding menu to GtkMenuButton it is not showing,tried different box to contain it(no use),anyone can say what i amdoing wrong?
from gi.repository import Gtk
class Window(Gtk.Window):
def __init__(self):
…
I'd like to draw inside my Gtk.DrawingArea objects. I have to connect the drawing function to the "draw" event, not to the "expose-event", because i'm working with gtk3.
But this doesn't work.
Here is my code:
def draw(widget, context, args=()):
…
pywebkit makes calls from python into webkit by introspection. The prototype of called functions are bound at runtime. A little problem for developers is that you will not see the prototype in source code. How do you find the function prototype?…
How webkit3 resolve its primary font on Linux?
(Got a segmentation fault in libwebkitgtk-3.0. Anybody has seen similar problem? Is there a way to work-around it? How to debug or fix it with minimal change to the system?)
The gdb prints:
Program…