Questions tagged [gtk]

GTK (formerly GTK+) is a toolkit for creating graphical user interfaces (GUIs) with cross platform compatibility and an easy to use API.

GTK is written in C, and has bindings to many other popular programming languages such as C++ (), Python (, ), C# (), and Perl, among others. GTK+ is licensed under the GNU LGPL 2.1, allowing development of both free and proprietary software with GTK+ without any license fees or royalties.

"GTK" stands for GIMP Tool Kit. It was originally developed to serve as the widget set for The GIMP, the GNU Image Manipulation Program. In the intervening years its usage has expanded greatly.

This tag should be used for questions about GTK in general. For more specific questions regarding how a certain version works, use or .

Reference GTK 3 documentation: http://developer.gnome.org/gtk3/stable/

Reference GTK 2 documentation: http://developer.gnome.org/gtk2/stable/

GTK Java binding - http://java-gnome.sourceforge.net/

GTK 2 Perl binding - https://metacpan.org/pod/Gtk2

GTK 3 Perl binding - https://metacpan.org/pod/Gtk3

Books:

SO Chatroom:

8468 questions
3
votes
1 answer

In Gtk#, why is my MenuToolItem not displaying its Menu?

I want to add a MenuToolItem to my Toolbar. It contains two RadioMenuItems. However, when I click the drop-down arrow, I see this: This is my current code: MenuToolButton reviewModeToolButton = new MenuToolButton…
Matthew
  • 28,056
  • 26
  • 104
  • 170
3
votes
2 answers

JSON encode/decode GTK enums

I have to save various properties of custom GTK elements to a file for future use and decided to use JSON because of the simple format and nesting of dicts. Many properties are GTK enums, like gtk.PAGE_ORIENTATION_PORTRAIT, gtk.ANCHOR_CENTER and…
Timo
  • 164
  • 2
  • 12
3
votes
0 answers

How to scroll in a Gtk::ScrolledWindow to a specific row from a Gtk::TreeView

I have a Gtk::TreeView inside a Gtk::ScrolledWindow. At one point I get a Gtk::TreeRow row. How can I know if the row is in the visible area and how can I scroll the ScrolledWindow so that the row will be visible? L.E.: I found the…
3
votes
2 answers

how do I overlay an image on webview using python Gtk and webkit

I need help on how to overlay an image on a webview. I want to be able to place a button or an image on a webpage (a webview object) So I have the following import gtk import…
Ayub
  • 33
  • 4
3
votes
1 answer

Creating a simple gtk list

I would like to create a simple table in gtk with the following content: | test name | 0 | 10 | I simply want to create this, but gtk doesn't make this easy. I have made a GtkListStore which contains all the information I need, but apparently I…
user1502256
3
votes
1 answer

Python GTK - Pass mouse click to window below

I am creating an Ubuntu program that creates a transparent popup window. I would like it to act similarly to the notify-osd popups. When the mouse hovers over the window it fades even more. When the user click the dialog, the event is sent to the…
bmandesign
  • 347
  • 1
  • 3
  • 11
3
votes
2 answers

Open a PyGTK program but do not activate it

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…
Funsi
  • 514
  • 4
  • 8
3
votes
1 answer

Get notified on clipboard change via D-Bus

Is there a way to get notified of clipboard change in KDE/GNOME via D-Bus? How can I capture/eavesdrop/subscribe to clipboard selection (esp. in PyGTK)? I have gtk.Clipboard.wait_for_text() method available but it returns clipboard contents…
LetMeSOThat4U
  • 6,470
  • 10
  • 53
  • 93
3
votes
1 answer

Eclipse/GTK+ wasting screen real estate

Eclipse on Linux (GTK+) has rather large UI elements which wastes screen real estate. Compare the Linux version (taken on Ubuntu 9.10): with the Windows version: Note the vertical size of the Project Explorer tab, the menubar, and the toolbar. Is…
JesperE
  • 63,317
  • 21
  • 138
  • 197
3
votes
1 answer

DBus Glib Send Signal - No signals being emitted

I am attempting to send a signal out over the session message bus. I am able to call methods fine using d-feet dbus debugger with no problem. Unfortunately d-feet does not allow you to connect to signals to debug those. In replacement I am using…
Mask
  • 31
  • 1
  • 4
3
votes
1 answer

How to create a cairo_t on a Gtk 2 window

I have an old app, now compiling on Gtk 2, but I need to introduce the use of Cairo. I can't figure out how to create the necessary cairo context (cairo_t) from my Widgets. Here's the code I'm trying to learn with so far, modified (*ahem* cribbed)…
4dummies
  • 759
  • 2
  • 9
  • 22
3
votes
0 answers

GtkTreeViewColumn resizing based on contents

So it turns out that we'd like to use fixed height mode, because it's faster and it doesn't constantly try to update the treeview — we saw a significant decrease in CPU use with a table that, unfortunately, may contain a few thousand rows and some…
Ralesk
  • 31
  • 1
  • 4
3
votes
1 answer

How to pass multiple arguments through g_idle_add()?

I'm trying to use g_idle_add() with function that needs multiple arguments. Can I pass them just inline somehow or do I have to create a structure for this? The main goal is to reduce memory consumption, everything else is secondary. static gboolean…
int_ua
  • 1,646
  • 2
  • 18
  • 32
3
votes
1 answer

GTK C# Widget Change Color Not working

Im trying to change the color of button widget in GTK# by using button1.ModifyBase(Statetype.Normal,new Gdk.Color(1,1,1)); This is called from another button click event,but the widget color is not updated why is this?
techno
  • 6,100
  • 16
  • 86
  • 192
3
votes
0 answers

Recognizing JavaScript functions with GJS (Spidermonkey 1.7)

I am playing around Christian Hergert GtkBuilder + Inline JavaScript and I write a Glade plugin to edit JavaScript code. Here is an screenshot: (source: googlecode.com) I want to recognize the functions of an JavaScript with GJS (Spidermonker 1.7…
Juan Manuel
  • 311
  • 1
  • 11
1 2 3
99
100