Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | import string |
2 | import Pmw | |
3 | ||
4 | _default_text = "AlphaExample example alpha Pmw megawidget.\nPmw version: " + \ | |
5 | Pmw.version() + '\nPmw Alpha versions: ' + \ | |
6 | string.join(Pmw.version(alpha = 1), ' ') | |
7 | ||
8 | class AlphaExample(Pmw.MessageDialog): | |
9 | # Dummy widget for illustrating use of Pmw alpha version directory | |
10 | ||
11 | def __init__(self, parent = None, **kw): | |
12 | ||
13 | # Define the megawidget options. | |
14 | INITOPT = Pmw.INITOPT | |
15 | optiondefs = ( | |
16 | ('message_text', _default_text, None), | |
17 | ) | |
18 | self.defineoptions(kw, optiondefs) | |
19 | ||
20 | # Initialise the base class (after defining the options). | |
21 | Pmw.MessageDialog.__init__(self, parent) | |
22 | ||
23 | # Check keywords and initialise options. | |
24 | self.initialiseoptions(AlphaExample) |