Linux Today: Linux News On Internet Time.

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()

"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: