next up previous
Next: GTK main loop vs Up: Adding a Graphical User Previous: Implementing a GTK controller

Exercises

The source code for the GUI example can be found here.

  1. The set_sensitive() method can be called on any GTK widget. It accepts one argument, which is either true or false. When it is false, the widget is greyed out and the user cannot interact with it. The tstep and nstep values are only needed for the simulator, and not the minimiser. Connect a callback to the option menu that greys out tstep and nstep entries and labels when the user selects simulate, and desensitises them when they select minimise. You may want to refer to the PyGTK tutorial for help.
  2. When the simulation or minimisation is running, why can't we use the GTK controller?



James Roper 2004-02-12