File: PmwLabeledWidget.py.html

package info (click to toggle)
python-pmw 0.6.2-0.1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,652 kB
  • ctags: 2,716
  • sloc: python: 10,720; makefile: 44; sh: 24
file content (47 lines) | stat: -rw-r--r-- 1,513 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE HTML PUBLIC "-//Netscape_Microsoft//DTD HTML 3.0//EN">
<HTML>

<!-- This file generated using the Python HTMLgen module. -->
<HEAD>
  <META NAME="GENERATOR" CONTENT="HTMLgen 1.1">
        <TITLE>PmwLabeledWidget.py</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<PRE>
import Tkinter
import Pmw

<STRONG><FONT COLOR="#CC6600">class LabeledWidget</FONT></STRONG>(Pmw.MegaWidget):
<STRONG>    def __init__</STRONG>(self, parent = None, **kw):

	<FONT COLOR="#DD0000"># Define the megawidget options.</FONT>
	INITOPT = Pmw.INITOPT
	optiondefs = (
	    (<FONT COLOR="#009900">'labelmargin'</FONT>,            0,      INITOPT),
	    (<FONT COLOR="#009900">'labelpos'</FONT>,               None,   INITOPT),
	)
	self.defineoptions(kw, optiondefs)

	<FONT COLOR="#DD0000"># Initialise the base class (after defining the options).</FONT>
	Pmw.MegaWidget.__init__(self, parent)

	<FONT COLOR="#DD0000"># Create the components.</FONT>
	interior = Pmw.MegaWidget.interior(self)
	self._labelChildSite = self.createcomponent(<FONT COLOR="#009900">'labelchildsite'</FONT>,
		(), None,
		Tkinter.Frame, (interior,))
	self._labelChildSite.grid(column=2, row=2, sticky=<FONT COLOR="#009900">'nsew'</FONT>)
	interior.grid_columnconfigure(2, weight=1)
	interior.grid_rowconfigure(2, weight=1)

	self.createlabel(interior)

	<FONT COLOR="#DD0000"># Check keywords and initialise options.</FONT>
	self.initialiseoptions(LabeledWidget)

<STRONG>    def interior</STRONG>(self):
	return self._labelChildSite

</PRE>

 </BODY> </HTML>