PythonGTK Programming part 3: Screensaver, Objects, and User Input
Jun 11, 2009, 19:03 (0 Talkback[s])
(Other stories by Akkana Peck)
"Make the window fullscreen
All through the last article I used the term "screensaver" because
this sort of whizzy graphics looks kind of like something you'd see
in a screensaver application. Well, except for one thing:
screensavers cover the whole screen, not just a little window. How
can you make your PyGTK application do that?
"That's easy: the fullscreen() function. Call it right after
you've created the main window:
# Create the main window:
win = gtk.Window()
win.fullscreen()
"But when you make the window that big (Figure 1), you start
noticing a problem: that big button at the bottom looks silly. You
could make it smaller; but why not remove it entirely, and use
keyboard events to tell the program when to exit?"
Complete
Story
Related Stories:
- Graphical Python Programming part 2: Write Your Own Screensaver(May 28, 2009)
- Graphical Python Programming With PyGTK(May 14, 2009)
- Creating a Fancy 3D-Effect GIMP Plugin in Python(Apr 24, 2009)
- Writing Plugins for GIMP in Python(Apr 09, 2009)
- GUI Programming in Python For Beginners: Create a Timer in 30 Minutes(Mar 26, 2009)
- Intro to Shell Programming: Writing a Simple Web Gallery(Mar 12, 2009)
- The Linux CLI for Beginners, or, Fear Not the Linux Command Line!(Dec 12, 2008)
- Why Firefox Rocks: Great Firefox Tricks, Part IV(Nov 20, 2008)