Added a common way to set the pane header.
This commit is contained in:
parent
ba505cf681
commit
357803c00e
1 changed files with 13 additions and 0 deletions
13
wizpym.py
13
wizpym.py
|
@ -104,6 +104,19 @@ class Pane(gtk.VBox):
|
|||
if len(self._successors) == 1:
|
||||
self._switch = klass
|
||||
|
||||
def set_header(self, msg):
|
||||
"""Add a help header to the pane with the given message.
|
||||
|
||||
Since it is quite common that panes begin with a little guide
|
||||
explaining the current step, calling this method will ensure
|
||||
such panes all present the same header style.
|
||||
"""
|
||||
help_label = gtk.Label(msg)
|
||||
help_label.set_justify(gtk.JUSTIFY_FILL)
|
||||
help_label.set_line_wrap(True)
|
||||
self.pack_start(help_label, False, False, 10)
|
||||
self.pack_start(gtk.HSeparator(), False, False)
|
||||
|
||||
def switch(self, klass):
|
||||
"""Update the switch using the given class.
|
||||
|
||||
|
|
Loading…
Reference in a new issue