PythonGTK Programming part 3: Screensaver, Objects, and User Input

“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?”


Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis