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
1 answer

PyGTK setting text of an entry (absolute beginner)

I'm a total PyGTK noob, just to get that out there. I'm trying to set an entry's text with this code: def on_button1_clicked(self, builder, data = None): gtk.Entry(txtInput).set_text("Hello") but when I click the button I get a type error…
0
votes
1 answer

Set label in popup menu - no hovering

Can I set a label (text) in popup menu (gtk.Menu) but without hovering effect, for example: LABEL MenuItem1 (hover effect) MenuItem2 (hover effect) MenuItem3 (hover effect) EDIT: This is not popup menu example but it show hover effect. For…
PaulP
  • 1,925
  • 2
  • 20
  • 25
0
votes
1 answer

pygtk textview tab width?

Is there a way to set the tab width of the pygtk TextView widget to be something other than 8spaces? Right now I tried textview.set_tabs(pango.TabArray(4, False)) However, it seems like I misunderstood the docs. What the actual way to do it? Thanks
Pwnna
  • 9,178
  • 21
  • 65
  • 91
0
votes
1 answer

Widget background color in system color?

how can I set the color of a widget(VBox in particular) to the same color as are default dialogs on Windows? It seems to work properly automatically on Linux, but on Windows the widget is a different shade of gray. It is placed as a custom widget…
Marin
  • 1,311
  • 16
  • 35
0
votes
1 answer

Communicate with parent's children

I'm trying to write a GUI with the following structure (only relevant parts): Window -> VBox -> HBox -> Frame: Input -> ScrolledWindow -> TreeView -> ListStore: Output As soon as the input is received, a list will we computed that…
Sandra
  • 3,560
  • 5
  • 24
  • 31
0
votes
2 answers

Overlay Other GUI Elements Over GStreamer Video

I have a project built in Python, PyGTK 2.24, and PyGST (GStreamer). I have my video working perfectly in a gtk.DrawingArea object. However, I need to display other GUI elements OVER this video while it is playing. (Please don't ask why, just trust…
CodeMouse92
  • 6,840
  • 14
  • 73
  • 130
0
votes
2 answers

How to get the control over the selection in a gtk.IconView?

I want to change the opacity or color of a gtk.IconView select box (I want actually to make the selection more visible). I noticed that the gtk.IconView widget had style properties selection-box-alpha & selection-box-color but only accessible for…
Loïc G.
  • 3,087
  • 3
  • 24
  • 36
0
votes
0 answers

PyGObject Scroll to bottom of ScrolledWindow() after adding row to child TreeView

I am building a GUI program that features a "history" that consists of an expanding list containing text entries for every action. I display this using a TreeView whose model is updated every time the history updates. This part works. I want the…
pingin
  • 1
  • 1
0
votes
0 answers

replacement of get_data and set_data in pygtk3

In pygtk3, when using set_data, it complained RuntimeError: Data access methods are unsupported. Use normal Python attributes instead. In pygtk, I can use set_data to attach a widget to another widget and use get_data to retrieve the attached widget…
warem
  • 1,471
  • 2
  • 14
  • 21
0
votes
1 answer

PyGTK calculator

I want to make a calculator with Python GTK. I am trying to get a button to display my text in the application. However, my function gives me this error TypeError: Calculator.clickedButton1() takes 1 positional argument but 2 were given. I know…
0
votes
1 answer

PyGtk CellRendererProgress start/end positions

Is there any way to fill a gtk.CellRendererProgress indicating the start and end positions? Not just the end. As an example of what I would need to do is, instead of this: |##############################----------| (from 0% to 80%) I need to do…
hteso
  • 55
  • 2
  • 7
0
votes
1 answer

PyGtk with Gtk+3 gives illegal instruction 4

I'm on macOS Ventura with Python3. I'm trying to setup the system for PyGtk development. I installed home-brew and gtk+3 3.24.38 and pygobject3 3.44.1. When I run the following sample "hello world", I get an Illegal Instruction: 4. I know what…
Yogi Wannabe
  • 141
  • 7
0
votes
0 answers

Change color of checkbox/checkbutton and entry box backgound and textpygtk2

I'm using a treeview that I'm trying to customize to suite my requiments or how I would like it to look, I have most of the color changing working how I'd like using modify_base/modify_text and set_property('foreground',"dadada") or…
WillG
  • 1
  • 2
0
votes
3 answers

Simulate mouse/keyboard events (gtk + HOOPS 3D)

how can I simulate mouse/keyboard events in gtk/gdk? I have a window widget containing HOOPS 3D widget and need to simulate mouse clicking on various parts of the window, along with simulating keyboard, ie. CTRL pressed, etc. I found…
Marin
  • 1,311
  • 16
  • 35
0
votes
1 answer

Create an executable from a Python and PyGTk script under windows

I wrote in Linux a script in Python which uses PyGtk. I am trying to run it in Windows and create an executable. The only working way I found to run python and PyGtk under Windows is using MSYS2. But, when I try to create an executable with…