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
17
votes
2 answers

gi.repository Windows

I'm developing an app which has to be 100% compatible on windows and on linux. On linux I have no problems, but on windows I came up with this message: from gi.repository import Gtk ImportError: No module named gi I installed pygobject,…
Yerko Antonio
  • 657
  • 3
  • 8
  • 16
16
votes
1 answer

How to get value from selected item in treeview in PyGTK?

I'm learning PyGtk. I have a simple treeview with 1 column, I get items for that treeview from list. How to get value of selected item in treeview?
shiii
  • 175
  • 1
  • 1
  • 5
16
votes
4 answers

How to make GtkTextView look like GtkEntry?

Or "How to add a visible (thin) border to GtkTextView"? Is it ever possible? Thank you in advance.
Paulo Freitas
  • 13,194
  • 14
  • 74
  • 96
16
votes
3 answers

Glade treeview liststore data not visible, can't imagine why

I've got 99% 44/100 of everything working. I have a glade file, I use gtkbuilder to render it and voila it comes up. Everything except the data in my treeview liststore. I notice by default the tree view is not visible, and setting that to true…
stu
  • 8,461
  • 18
  • 74
  • 112
16
votes
5 answers

How to get native windows decorations on GTK3 on Windows 7+ and MSYS2

I am trying to port my application from linux to windows and I have a problem with theming. In linux this works out of a box, just compile it and application is using good theme and looks native. I have installed gtkmm3 and gtk3 in MSYS2 and I am…
kracejic
  • 723
  • 1
  • 6
  • 17
16
votes
2 answers

GTK# Image Buttons not showing Images when Running

Im trying to use Image Buttons in GTK# (Xamarin Studio).I set the Image to the button and in the UI Builder the Image is coming up. But when i run the program there is no image in the button I tried this in Different versions of the IDE and on…
techno
  • 6,100
  • 16
  • 86
  • 192
16
votes
1 answer

Authenticating GTK app to run with root permissions

I have a UI app (uses GTK) for Linux that requires to be run as root (it reads and writes /dev/sd*). Instead of requiring the user to open a root shell or use "sudo" manually every time when he launches my app, I wonder if the app can use some…
Thomas Tempelmann
  • 11,045
  • 8
  • 74
  • 149
16
votes
7 answers

R fails after installing GTK and RGtk2

I've installed R3.0 on my Mountain Lion Mac and after some trial and error the version of GTK suggested by http://r.research.att.com/ for R3.0: GTK+ 2.24.17 framework. I load the package into R3.0 and run one of the demo. I see (for an instant)…
Enzo
  • 2,543
  • 1
  • 25
  • 38
16
votes
2 answers

Get icon name for a stock ID?

Question I'm trying to retrieve the (string) icon name(s) corresponding to a given (string) Gtk stock ID. Example Gtk stock id 'gtk-go-forward' has two corresponding icon names, 'gtk-go-forward-ltr' and 'gtk-go-forward-rtl'. I'd like to retrieve…
mathematical.coffee
  • 55,977
  • 11
  • 154
  • 194
16
votes
1 answer

How to upgrade gtk2hsC2hs?

I am trying cabal install glib-0.12.3 under my Ubuntu 11.10 using cabal-install 0.10.2. However, it shows the following error messages: setup: The program gtk2hsC2hs version >=0.13.5 is required but the version found at /usr/bin/gtk2hsC2hs is…
zw324
  • 26,764
  • 16
  • 85
  • 118
15
votes
2 answers

Suppressing Valgrind errors from GTK+

I have an application that uses GTK+ and Glade; running Valgrind with the memcheck tool outputs about 2,000 errors. Does anyone have a good suppression file they can share for GTK applications? I tried these, but each still leaves me with ~900…
Nate Glenn
  • 6,455
  • 8
  • 52
  • 95
15
votes
4 answers

Changing color of Eclipse links in quick fix or Eclipse links in preferences on Linux

if i use a dark theme then links in Eclipse-"quick fix" or in i.e. Eclipse->Preferences->General->Editor (the three 'see... "File Associaton"|"Content Types"|"Appearance"'-links) are unreadable. On this image the links i am talking about are cyan on…
andi_s
  • 151
  • 1
  • 4
15
votes
4 answers

Can you get the parent GTK window from a widget?

I have a custom widget and it needs to launch a MessageDialog and in order for me to put that message dialog on top of the window my widget is in then I need access to the parent gtk.window. Is there a way to get the parent GTK window? Thanks
user631263
  • 151
  • 1
  • 1
  • 3
15
votes
1 answer

How can I make a GtkTreeView work with a vertical scrollbar in Glade3?

I'm using glade 3, to create TreeView and successfully added row as algorithm done, but I had a little issue because treeview will add new row, thus my "GUI" will getting longer to the below, how could I add the scrollbar for this TreeView? in order…
capede
  • 945
  • 1
  • 13
  • 26
15
votes
2 answers

gtk_widget_add_tick_callback() and gtk_main_iteration()

I have two GTK windows Normal (main) window that runs animation, draws stuff in callback registered by gtk_widget_add_tick_callback(). At some point secondary window is created that runs modal loop: void show_modal() { GtkWindow* gw =…
c-smile
  • 26,734
  • 7
  • 59
  • 86