python Programming Glossary: gtk.window
GTK window capture: VPython (OpenGL) application http://stackoverflow.com/questions/10934787/gtk-window-capture-vpython-opengl-application def run self Draw the GTK GUI. gtk.threads_enter window gtk.Window window.show socket gtk.Socket socket.show window.add socket.. import gtk import pygtk self.OpenGLWindowID winID window gtk.Window window.show socket gtk.Socket socket.show window.add socket..
Showing a gtk.Calendar in a menu? http://stackoverflow.com/questions/11132929/showing-a-gtk-calendar-in-a-menu __main__ class CalendarExample def __init__ self window gtk.Window gtk.WINDOW_TOPLEVEL window.set_title Calendar Example window.set_border_width.. import time class CalendarExample def __init__ self window gtk.Window gtk.WINDOW_TOPLEVEL window.set_title Calendar Example window.set_border_width.. the same properties as the window # in applet. cal_window gtk.Window gtk.WINDOW_TOPLEVEL cal_window.set_decorated False cal_window.set_resizable..
Running function 5 seconds after pygtk widget is shown http://stackoverflow.com/questions/1309006/running-function-5-seconds-after-pygtk-widget-is-shown destroy_cb widget data None gtk.main_quit def main window gtk.Window gtk.WINDOW_TOPLEVEL window.connect show show_cb window.connect..
How do I render *parts* of a svg file? http://stackoverflow.com/questions/2321155/how-do-i-render-parts-of-a-svg-file from xml import xpath from xml.dom import minidom window gtk.Window window.set_title Foo window.set_size_request 256 256 window.set_property.. to this # usr bin env python import gtk import rsvg window gtk.Window window.set_title Foo window.connect destroy gtk.main_quit window.show..
Simple pygtk and threads example please http://stackoverflow.com/questions/2615124/simple-pygtk-and-threads-example-please return start class Fun object def __init__ self window gtk.Window vbox gtk.VBox btnone gtk.Button 'one' btnone.connect 'clicked'..
How to center a Window on the screen in Tkinter? http://stackoverflow.com/questions/3352918/how-to-center-a-window-on-the-screen-in-tkinter x y pyGTK OTOH is much better import pygtk import gtk win gtk.Window gtk.TOPLEVEL win.resize 300 300 win.set_position gtk.WIN_POS_CENTER..
Is this possible to draw GtkTreeView listed like GtkIconView? http://stackoverflow.com/questions/3596926/is-this-possible-to-draw-gtktreeview-listed-like-gtkiconview gtk.gdk.pixbuf_new_from_file arg store.append pixbuf w gtk.Window w.connect 'destroy' lambda w gtk.main_quit sw gtk.ScrolledWindow..
Preventing window overlap in GTK http://stackoverflow.com/questions/3859045/preventing-window-overlap-in-gtk properties like so assuming self.window is an instance of gtk.Window self.window.get_toplevel .show # must call show before property_change.. class PyGtkWidgetDockExample def __init__ self self.window gtk.Window gtk.WINDOW_TOPLEVEL self.window.set_default_size 100 gtk.gdk.screen_height..
How to display an image from web? http://stackoverflow.com/questions/3962180/how-to-display-an-image-from-web written this simple script in python import gtk window gtk.Window window.set_size_request 800 700 window.show gtk.main now I want.. occurred gtk.main_quit def __init__ self self.window gtk.Window gtk.WINDOW_TOPLEVEL self.window.connect destroy self.destroy..
How to get transparent background in window with PyGTK and PyCairo? http://stackoverflow.com/questions/4889045/how-to-get-transparent-background-in-window-with-pygtk-and-pycairo 0 0 0.9 0.8 cr.fill def main argc global win win gtk.Window win.set_decorated False win.connect 'delete_event' gtk.main_quit.. 1 2 widget.get_size 0 2 0 pi 2 cr.fill def main argc win gtk.Window win.set_decorated False # Makes the window paintable so we can..
Finding the workspace size (screen size less the taskbar) using GTK http://stackoverflow.com/questions/502282/finding-the-workspace-size-screen-size-less-the-taskbar-using-gtk with and set the main window accordingly with this window gtk.Window screen window.get_screen window.resize screen.get_width screen.get_height.. # Create the window connect the signal then maximise it w gtk.Window w.show_all w.connection_id w.connect 'size request' _on_size_req..
Need a simple “Hello World” example using the Webkit library in Python http://stackoverflow.com/questions/647041/need-a-simple-hello-world-example-using-the-webkit-library-in-python view webkit.WebView sw gtk.ScrolledWindow sw.add view win gtk.Window gtk.WINDOW_TOPLEVEL win.add sw win.show_all view.open http w3.org..
How to Add an icon to an ubuntu app http://stackoverflow.com/questions/10979412/how-to-add-an-icon-to-an-ubuntu-app named icon your application can refer to it by name window Gtk.Window window.set_icon_name myapp Now one other thing you'll need to..
How to send commands to pygobject virtual terminal? http://stackoverflow.com/questions/11804455/how-to-send-commands-to-pygobject-virtual-terminal from gi.repository import Gtk GObject Vte class TheWindow Gtk.Window def __init__ self Gtk.Window.__init__ self title inherited cell.. GObject Vte class TheWindow Gtk.Window def __init__ self Gtk.Window.__init__ self title inherited cell renderer self.set_default_size.. unless you want that functionality. class TheWindow Gtk.Window def __init__ self Gtk.Window.__init__ self title inherited cell..
Threading in Gtk python http://stackoverflow.com/questions/11923008/threading-in-gtk-python threading.current_thread .join map str args class MyWindow Gtk.Window def __init__ self Gtk.Window.__init__ self title Hello World.. map str args class MyWindow Gtk.Window def __init__ self Gtk.Window.__init__ self title Hello World self.button Gtk.Button label..
Extending from GtkBin http://stackoverflow.com/questions/14253553/extending-from-gtkbin self .__init__ args kwargs self.add Gtk.Entry win Gtk.Window win.connect delete event Gtk.main_quit search QuickSearch win.add.. self.get_child .size_allocate child_allocation win Gtk.Window win.connect delete event Gtk.main_quit search QuickSearch win.add..
How to do background task in gtk3-python? http://stackoverflow.com/questions/16934087/how-to-do-background-task-in-gtk3-python import gobject class gui def __init__ self self.window Gtk.Window self.window.connect 'delete event' Gtk.main_quit self.box Gtk.Box.. import threading class gui def __init__ self self.window Gtk.Window self.window.connect 'delete event' Gtk.main_quit self.box Gtk.Box..
Has threading in GTK w/ Python changed in PyGObject introspection? http://stackoverflow.com/questions/6943098/has-threading-in-gtk-w-python-changed-in-pygobject-introspection Gtk.main_quit #Gui bootstrap window and progressbar window Gtk.Window progressbar Gtk.ProgressBar window.add progressbar window.show_all..
Python. Doing some work on background with Gtk GUI http://stackoverflow.com/questions/8120860/python-doing-some-work-on-background-with-gtk-gui import Gtk Gdk class Gui def run self self.Window Gtk.Window self.Window.set_border_width 8 self.Window.set_title Π΅ΠΊΠΈΠΉ.. import Gtk Gdk GLib import threading import time class Gui Gtk.Window def __init__ self self.Window Gtk.Window self.Window.set_border_width.. time class Gui Gtk.Window def __init__ self self.Window Gtk.Window self.Window.set_border_width 8 self.Window.set_title Π΅ΠΊΠΈΠΉ GUI..
Embed evince Python GI http://stackoverflow.com/questions/8942604/embed-evince-python-gi self.on_activate def on_activate self data None window Gtk.Window type Gtk.WindowType.TOPLEVEL window.set_title Evince Gtk3 Python.. def on_activate self data None window Gtk.Window type Gtk.WindowType.TOPLEVEL window.set_title Evince Gtk3 Python Example window.set_border_width..
|