Last changed on Sat Feb 4 20:08:52 2012 CST

(Entries marked with ** were changed within the last 24 hours; entries marked with * were changed within the last 7 days.)


1. General information and availability


2. Changes from 1.2 to 1.3/2.0


3. Signal handling


4. Themes, fonts and styles


5. Basic Objects: GObject, GtkWidget and other critters


6. Widget subclasses and user signals: GObject


7. Labels: GtkLabel


8. Images: GtkImage, GtkPixmap, GdkPixbuf


9. Buttons: GtkButtons


10. Windows: GtkWindows and GtkDialogs

10.1. How do I get a GdkWindow from a GtkWindow? 10.2. Where are GtkDialogFlags defined? 10.3. How do I get my windows to show up where I want? 10.4. How do I make a dialog block the whole application, so the user is forced to answer it? 10.5. I click on the close button (X) to close my gtk.Window. It disappears, but the program seems to hang! 10.6. How do I avoid having my gtk.Window instance destroyed when I click on the window's close button? (or, When I redisplay my window, all my child widgets are missing and I get a bunch of Gtk-Critical errors!) 10.7. How do I change the window manager's icon for a PyGTK Window? 10.8. How do I get the GtkWindow's title? 10.9. How do I change the buttons on a MessageDialog? 10.10. How do I scroll a ScrolledWindow to the position of a given child widget? 10.11. How do GtkDialogs work? 10.12. How do I make ENTER in an entry box activate the OK signal 10.13. When closing the GnomeAbout box (or other GtkDialog subclasses), I get crashes and weird callback behaviour. What up with that? 10.14. I created a modal dialog, but clicking on the main window covers it! 10.15. How do I get the position of my window in absolute terms (IOW, relative to the root X window) 10.16. How do I start up a window maximized? 10.17. How do I run a dialog without running another main loop? 10.18. Changing a Window's background color 10.19. How do I get XID for a GtkWindow? And for the root window? 10.20. How can I make my window appear in the center of the screen? 10.21. How to hide a window when clicking the close button (instead of destroying it) 10.22. How can I find out when my GtkWindow is minimized? 10.23. How can I find out if a gtk.Window is visible? 10.24. How do I create a shaped window? 10.25. How do I raise a window that is minimized or covered? 10.26. Creating dialogs using the Glade file 10.27. How can I focus an external window? 10.28. How do I make a ScrolledWindow take the size of its child? Add new entry (at this point)

11. Menus: Gtk*Menu and Gtk*MenuItem GtkToolbar


12. Simple Containers: GtkBoxes, GtkTable, GtkFixed, GtkAlignment


13. Lists and Trees: GtkList/TreeView

13.1. Is there a nice tutorial on using GtkTreeView and GtkTreeModel? 13.2. How do the TreeStore and ListStore sequence APIs behave? [PyGTK2] 13.3. How do GtkTreePaths work? [PyGTK2] 13.4. How do I define columns for a TreeView using TreeViewColumn? 13.5. How do I create my own custom TreeModel. 13.6. How do I put icons in a TreeView? 13.7. How do I get all the selections in my TreeView. 13.8. How do I delete the selected rows in a TreeView? 13.9. Is there a way to mass-specify columns in ListStore? 13.10. How do I make a GtkTreeView with editable cells? 13.11. What signal is emitted when a user selects/clicks on a row in a GtkTreeView? 13.12. How do I change the color of the alternate row shading on the TreeView widget? 13.13. How do I create a lazy TreeView? 13.14. How do I show different images when a TreeView item is expanded and collapsed. 13.15. My TreeView/TreeModel rows represent instances (or any python object), but how can I keep track of them? 13.16. My Treeview shows all my strings/text values as numbers in the columns! 13.17. How do I make a popup menu appear when I right-click my TreeView? 13.18. Is it possible for a TreeModel to tell a CellRendererToggle that it is in an "in between" (inconsistent) state? 13.19. How do I change alignment on a specific cell renderer? 13.20. How do I keep GenericTreeModel from leaking references? 13.21. How do I get changes in my TreeModel to show up in my TreeView? 13.22. How do I display a combo box in a Treeview? 13.23. Why doesn't expand_row() display an expanded row for paths longer than one element? 13.24. How do I transform the value in my model before displaying it in the TreeView? 13.25. How do I delete multiple selections? 13.26. How do I perform an action when the user clicks on the title column of a TreeView? 13.27. How do I run a command for each TreeModel row, or how does TreeModel.foreach() work? 13.28. When connecting to 'row-inserted', my model value is always None. Why? 13.29. How do I use a python object to store data for all the columns in a row? 13.30. How do I move rows around in a GtkTreeView? 13.31. How do I change the color of a row or column of a TreeView? 13.32. How do I select [or edit] a row in my TreeView? 13.33. How do I handle DnD operations in a GtkTreeView? 13.34. How do I work with the reorderable() property of GtkTreeview?/The reorderable() property of GtkTreeView is too limited 13.35. How do I use the TreeModelFilter to process tree/store data automatically? 13.36. How do I unselect a path in a TreeView? 13.37. How do I avoid displaying (hide) a certain column in a TreeView? 13.38. How do I display pixbufs instead of numbers for integer or boolean values in my treemodel? 13.39. I defined a TreeView in glade, how do I manipulate its columns and other properties? 13.40. How do I change the font of a CellRendererText? 13.41. How do I show a GtkImage (even animations) in a treeview? (subclassing GtkCellRenderer) 13.42. How do I show a picture (image) in a treeview background or exist any way how to set treeview (and window with treeview) as transparency ? 13.43. Are there tips for improving performance when adding many rows to a Treeview? 13.44. What is TreeRowReference and how to use it? 13.45. How do I create a custom gtk.CellRenderer? 13.46. How do I add a tooltip to a cell, row or column of a TreeView 13.47. How do I create a GtkTreeView having nodes with underlined text? 13.48. How do I hide some rows in a TreeView? 13.49. How to manually sort rows? 13.50. Target sensitive tooltip for treeview/iconview. 13.51. How do I get to previous row in the model when iter_prev() method doesn't exist? 13.52. How can I save and restore which rows are expanded in a TreeView? 13.53. How can I expand a range of nodes specified by first and last path? 13.54. How can I cut/copy/paste TreeStore rows using clipboard? 13.55. How do I enable editing of CellRendererProgress? 13.56. How do I create my own CellRendererDate? 13.57. How do I create my own CellRendererMultiline? 13.58. How do I hide the row expanders (or How do I share a model between tree and table view)? 13.59. Changing full background color of Treeview 13.60. How do I end editing immediately after an item is selected in a CellRendererCombo? Add new entry (at this point)

14. Editables: GtkEntry, GtkCombo, GtkText, GtkSpinButton, GtkTextView

14.1. How do I make a GtkEntry exactly 5 characters long? 14.2. What is a GtkTextIter, and how do I get one for position X (and other positions)? 14.3. How do I change the cursor for a GtkEntry? 14.4. Why does GtkText's insert_text generate critical messages complaining "assertion `index <= TEXT_LENGTH (text)' failed."? 14.5. I want to change the text being typed into an entry or textbox, but the original text is also inserted! 14.6. Why does the second parameter to insert_text (the `text' parameter) contain garbage? 14.7. Why isn't GtkText.insert_defaults() generating the signal insert_text 14.8. How do I get the currently selected text in a GtkCombo? 14.9. How do I programatically set the max value for a GtkSpinButton? 14.10. How do I scroll a TextView to display the text being inserted? 14.11. How do I insert colored text into a TextView? 14.12. How can I make GtkTextView to always show the last line 14.13. How do I add items into GtkCombo 14.14. How can get back the strings that I set using Combo.set_popdown_strings() 14.15. How do I change the mouse cursor on a TextView (or how do I get the "right" GdkWindow from a TextView)? 14.16. Is there a signal sent when a user hits enter in an editable? 14.17. What X clipboard do TextView's context menu items use? 14.18. How do I get the clipboard functions to work properly? 14.19. I'm getting a Gtk-CRITICAL messsage: assertion `g_utf8_validate (text, len, NULL)' failed [using insert_*] 14.20. How do I write clipboard callbacks for multiple widgets? 14.21. How do I right-align text in an Entry? 14.22. How do I create a mask or validator for a GtkEntry? 14.23. How do I send the output of an external process to a gtk.TextView without freezing the GUI? 14.24. How do I add completion support for an entry? 14.25. How can I place a background image on a TextView widget? 14.26. The text in the TextView is not aligned! Any ideas? 14.27. How do I prevent unselected gtk.Entry from being highlighted after losing focus? 14.28. How do I make the Enter key behave as a Tab key in a GtkEntry? Add new entry (at this point)

16. GtkOptionMenu, GtkComboBox, GtkComboBoxEntry


17. GtkNoteBook


18. GtkDrawingArea


19. Other widgets


20. The GTK Mainloop and Threading

20.1. What are the general tips for using threads with PyGTK? 20.2. On Win32, the input_add() function doesn't work! 20.3. How can I make Ctrl-C in the console quit my app which uses PyGTK 1.99.13 or older? 20.4. I get random crashing when using lots of threads in PyGTK 20.5. I want to show a splash screen and make it disappear. How? 20.6. I am using a separate thread to run my code, but the application (or the UI) hangs. 20.7. I set up a timeout handler using timeout_add, but the handler only runs once. 20.8. How do I check if threading was compiled in my version of PyGTK 20.9. I don't want to use threading. What other options do I have? 20.10. When an exception is raised, it is printed out to standard error! (or how do I get exceptions to be printed to X or displayed in a window?) 20.11. How can I monitor sockets or files inside the gtk mainloop (or how does gtk.input_add() work)? 20.12. How do I get an action to run periodically, say, every 30 seconds? 20.13. The GTK thread dies, but some windows remain open. I don't want that, what can I do? 20.14. My application uses threads and GtkDialogs seem to freeze it! What can I do? 20.15. I'm using threads and timeout or idle or input handlers and the app freezes. What's wrong? 20.16. So how do I use gobject.io_add_watch (used to be input_add) ? 20.17. Why isn't my thread running? 20.18. How do I write a qt application using gobject.MainLoop? 20.19. What does "Fatal Python error: GC object already tracked" mean? 20.20. gobject.io_add_watch doesn't work with non-blocking sockets on win32! 20.21. How do I download something without freezing the GUI (and without threading)? Add new entry (at this point)

21. Win32 and PyGTK


22. libglade


23. Miscellaneous questions

23.1. Why does ancient PyGTK versions segfault with Python 2.2? 23.2. Are there any helpful tools when developing with PyGTK? 23.3. How do I find out the current X and Y position of my mouse? 23.4. Are there any tips for UI designers? 23.5. Why does my X selection disappear when my window dies? 23.6. When compiling PyGTK, I get a bunch of weird "Could not write method ..." messages! 23.7. Is there a way to get version information from pygtk? 23.8. How do I beep the speaker? 23.9. Is there a way to grab the keyboard from X (like XGrabKey())? 23.10. When wrapping a widget into a new Python extension, I get undefined symbols on importing it! 23.11. Does VTK support PyGTK? 23.12. How do I create a GdkRectangle? 23.13. When I create a gnome Druid, the first and last page are blank. 23.14. I disable text or graphics on my GtkToolbar, or the time in my GnomeDateTime, and they still show up, or, why is show_all() considered harmful? 23.15. I'm writing a C extension that uses PyGTK. How do I acess a PyGTK object's C counterparts and vice-versa? 23.16. How do I change the font and colour of some GnomePrint text? 23.17. Is there a way to query for the current screen size? 23.18. When dragging and dropping, Netscape/Firefox/etc and gedit/native gtk apps don't behave the same. Why? 23.19. What do you see as the flaws in the Minimalist Programme? 23.20. How do I update a progress bar and do some work at the same time 23.21. How can I package my gnome-python application using autotools? 23.22. How can I extend PyGTK using gtkmm/C++ ? 23.23. How do I debug a PyGTK application without an interactive session? 23.24. Can GTK know the mouse position outside of GTK Application? 23.25. Is widget.set_property('visible', False) the same as widget.hide() ? 23.26. How do I change window properties involving atom values? 23.27. How do I port a GObject/Glib based C application to PyGTK? 23.28. How can I distribute gtkspell, trayicon (eg. modules that do not depend on gnome) so my application will take advantage of those but the user won't have to install gnome-python-extras? 23.29. How do I configure emacs to be used with pygtk? 23.30. Q_() is not available in my pygtk app. How to use Qualified translatable strings? 23.31. How to get the path to the file(s)/folder(s) that was dropped (by drag 'n' drop) in my application? [using selection.data] 23.32. How to get coordinates relative to X11 for a widget that has no window of its own? 23.34. How can I use gtk.binding_entry_add (and why it's better than keypress in most cases) 23.35. How can you set the tab / tabbing order? 23.36. How do I acquire a screenshot of the whole screen? 23.37. How do I create a throbber like the one in Firefox? 23.38. How can I access data returned with a gpointer? 23.39. How do I acquire a screenshot of the active window? 23.40. Is g_utf8_collate and g_utf8_collate_key available in PyGTK? 23.41. How can I create a GObject from a memory address? 23.42. How can integrate PyGTK with SDL / pygame ? 23.43. IDEs and editors with code completion support for PyGTK 23.44. How can I embed a Jython application in PyGTK? 23.45. How do you get your app to restart after you log out if it was running? 23.46. How do I get file mimetype and other info Add new entry (at this point)

24. Deprecated List Widgets: GtkList, GtkCList, GtkCTree and others

PyGTK FAQ Wizard | PyGTK Homepage | Feedback to faq at pygtk.org


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser