To display a GNOME pop-up notification at (200,400) on the screen (using Python):
import pynotify
n = pynotify.Notification("This is my title", "This is my description")
n.set_hint('x', 200)
n.set_hint('y', 400)
n.show()
I'm a gtk noob. How can I make this Notification show up centered on the screen, or at the bottom-center of the s...
I just downloaded and installed GLADE. What are some good tutorials for the C language?
...
I just started using GTK to develop my GUI applications. I'm using GEdit as my text-editor, so how can I get the following to be included in the syntax highlighting:
GtkWidget *window;
GtkWidget *button
GtkWidget *box1;
gtk_init(&argc, &argv);
as if it were like this:
int x = 3;
...
Hello,
What is the difference between GTK# and windows forms? Are they totally different?
Thanks
...
Sorry, not really programming question, but I am not sure where else I could find some help.
After a recent update (Xorg was updated among other things), GTK apps stopped running in my kde4. I have a Debian unstable, updated around 22 April. When I try to run them I get the following error:
ga@grzes:~$ iceweasel
The program 'firefox-...
I'm using Glade-3 for my GUI design, but I keep hitting this problem. I don't see anything in the GTK+ documentation mapping signals to events or in Glade-3 (3.4.5). Is there a place in the GTK+ source code to find this information?
Note: It is important in this question to recognize that events and signals are NOT the same thing in GTK...
Opening a gtk FileChooserDialog is painfully slow for nfs directories containing many files. strace shows a lot of time calling "stat". About 5 calls for each of the files in the directory. How can we switch off the calls to 'stat' and just show a list of filenames without the modification time?
We're using operating Redhat enterprise 4...
Where can I find a Gtkmm tutorial? I'm primarily a C# programmer, but I also know C++.
...
I want a visual GUI designer that will produce XML output in the format used by GtkBuilder. Glade seems to be the most powerful, although Gazpacho is more lightweight. Stetic (included with MonoDevelop) seems to be good but I don't believe it supports GtkBuilder yet.
...
I'm not asking for a code implementation, but given GTK+'s skillset, what would be from an abstract perspective the best way to implement a grid such that each square is clickable and the like?
...
I'm using gtkdialog in shell script but I got stuck.I tried "use-markup" to format the font,however it appears does not work.Is not there anything like ?
And if the program has several widgets the layout always be disorderly...
Is there a solution?Or a good tutorial on gtkdialog?(I searched but could not find one besides the user-manual)...
I've looked in the gtk source code and the header height is private. I've tried something but it didn't work as wanted (the heightWithHeader is 1?!)
Glib::RefPtr<Gdk::Window> pWindow = treeView.get_bin_window();
treeView.set_headers_visible(true);
pWindow->get_size(width, heightWithHeader);
treeView.set_headers_visible(false);
pWindo...
I have a simple (and also trivial) banking application that I wrote in C++. I'm on ubuntu so I'm using GNOME (GTK+). I was wondering if I could write all my GUI in C/GTK+ and then somehow link it to my C++ code. Is this even possible?
Note: I don't want to use Qt or GTKmm, so please don't offer those as answers.
...
I'm trying to catch a double-click event in a TreeView's empty area to create a new node. Unfortunately standard way doesn't work. I've tried attaching ButtonPressEvent to both TreeView and the ScrolledWindow in which T.V. is hosted. I don't get any callbacks to my function.
How can I solve this?
...
When my gtk application loads, the first item on the toolbar is automatically selected (it is highlighted, it is pressed when it hit enter). This is just a minor problem, but I would prefer for nothing to be selected by default.
Here is some basic sample code:
import gtk
import gtk.glade
window_tree = gtk.glade.XML('testtoolbar.glade'...
I'm playing around with gtkD (a D binding for GTK+)
I have a window object, instance of gtk.MainWindow. I want to handle keypresses on it.
How?
How do I deal with special keys (e.g. arrow keys, pgup/pgdn etc)?
PS I know these kinds of questions can be answered with google and stuff, but I've seen much "simpler" questions on stack...
I was able to get/set text from input fields in Win32 another application windows by traversing the windows using FindWinodwEx, finding the field, and then using SendMessage to send WM_GETTEXT/WM_SETTEXT to set/get text from that input field. This works great as long as I am working with Win32 windows of course.
However, Gtk+ application...
I want to add a widget to the bottom of a scrolled window, then scroll to the bottom of that window. However, the window thinks it is already at the bottom, because the widget has still not been allocated. I.e., this returns -1:
widget.get_allocation().y
Why is this? Is there any way to force the widget to be allocated immediately, so...
I need to remove the sorting arrow from a column header. This can be done by calling set_sort_indicator(false) on the column.
The arrow isn't displayed, but the space for it seems to still be reserved. If the title of the column is big enough to fill all the header, the last part is clipped (where the arrow should be).
Is there a way ...
When python raise an exception in the middle of a pygtk signal handling callback, the exception is catched by the gtk main loop, its value printed and the main loop just continue, ignoring it.
If you want to debug, with something like pdb (python -m pdb myscript.py), you want that when the exception occure PDB jump on it and you can sta...