/usr/share/doc/python-pmw-doc/html/Group.html is in python-pmw-doc 1.3.2-6build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | <html>
<head>
<meta name="description" content="Pmw - a toolkit for building high-level compound widgets in Python">
<meta name="content" content="python, megawidget, mega widget, compound widget, gui, tkinter">
<title>Pmw.Group reference manual</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ee"
vlink="551a8b" alink="ff0000">
<h1 ALIGN="CENTER">Pmw.Group</h1>
<center><IMG SRC=Group.gif ALT="" WIDTH=428 HEIGHT=209></center>
<dl>
<dt> <h3>Name</h3></dt><dd>
<p>Pmw.Group() -
frame with ring border and tag
</p>
</dd>
<dt> <h3>Inherits</h3></dt><dd>
<a href="MegaWidget.html">Pmw.MegaWidget</a><br>
</dd>
<dt> <h3>Description</h3></dt><dd>
<p>
This megawidget consists of an interior frame with an exterior
ring border and an identifying tag displayed over the top edge of
the ring. The programmer can create other widgets within the
interior frame.</p>
<p></p>
</dd>
<dt> <h3>Options</h3></dt><dd>
Options for this megawidget and its base
classes are described below.<p></p>
<a name=option.collapsedsize></a>
<dl><dt> <strong>collapsedsize
</strong></dt><dd>
Initialisation option. The distance from the bottom of the tag to the bottom of the ring
when the groupchildsite is collapsed. The default is <strong>6</strong>.</p>
</dd></dl>
<a name=option.tagindent></a>
<dl><dt> <strong>tagindent
</strong></dt><dd>
Initialisation option. The distance from the left edge of the ring to the left side of
the tag component. The default is <strong>10</strong>.</p>
</dd></dl>
</dd>
<dt> <h3>Components</h3></dt><dd>
Components created by this megawidget and its base
classes are described below.<p></p>
<a name=component.groupchildsite></a>
<dl><dt> <strong>groupchildsite
</strong></dt><dd>
The frame which can contain other widgets to be grouped. By default, this component is a Tkinter.Frame.</p>
</dd></dl>
<a name=component.hull></a>
<dl><dt> <strong>hull
</strong></dt><dd>
This acts as the body for the entire megawidget. Other components
are created as children of the hull to further specialise this
class. By default, this component is a Tkinter.Frame.</p>
</dd></dl>
<a name=component.ring></a>
<dl><dt> <strong>ring
</strong></dt><dd>
This component acts as the enclosing ring around the
<strong>groupchildsite</strong>. The default <strong>borderwidth</strong> is <strong>2</strong> and the
default <strong>relief</strong> is <strong>'groove'</strong>. By default, this component is a Tkinter.Frame.</p>
</dd></dl>
<a name=component.tag></a>
<dl><dt> <strong>tag
</strong></dt><dd>
The identifying tag displayed over the top edge of the enclosing
ring. If the pyclass for this component is <strong>None</strong>, (ie:
<code>tag_pyclass = None</code>, then no tag component is created. By default, this component is a Tkinter.Label.</p>
</dd></dl>
</dd>
<a name=methods></a>
<dt> <h3>Methods</h3></dt><dd>
Only methods specific to this megawidget are described below.
For a description of its inherited methods, see the
manual for its base class
<strong><a href="MegaWidget.html#methods">Pmw.MegaWidget</a></strong>.
<p></p>
<a name=method.collapse></a>
<dl><dt> <strong>collapse</strong>()</dt><dd>
Do not display the groupchildsite component.</p>
</dd></dl>
<a name=method.expand></a>
<dl><dt> <strong>expand</strong>()</dt><dd>
Display the groupchildsite component.</p>
</dd></dl>
<a name=method.interior></a>
<dl><dt> <strong>interior</strong>()</dt><dd>
Return the frame within which the programmer may create widgets.
This is the same as <code>component('groupchildsite')</code>.</p>
</dd></dl>
<a name=method.toggle></a>
<dl><dt> <strong>toggle</strong>()</dt><dd>
Display the groupchildsite component if it is currently hidden and
hide it if it is currently displayed.</p>
</dd></dl>
</dd>
<dt> <h3>Example</h3></dt><dd>
The image at the top of this manual is a snapshot
of the window (or part of the window) produced
by the following code.<p></p>
<pre>
class Demo:
def __init__(self, parent):
# Create and pack the Groups.
w = Pmw.Group(parent, tag_text='label')
w.pack(fill = 'both', expand = 1, padx = 6, pady = 6)
cw = Tkinter.Label(w.interior(),
text = 'A group with the\ndefault Label tag')
cw.pack(padx = 2, pady = 2, expand='yes', fill='both')
w = Pmw.Group(parent, tag_pyclass = None)
w.pack(fill = 'both', expand = 1, padx = 6, pady = 6)
cw = Tkinter.Label(w.interior(), text = 'A group\nwithout a tag')
cw.pack(padx = 2, pady = 2, expand='yes', fill='both')
radiogroups = []
self.var = Tkinter.IntVar()
self.var.set(0)
radioframe = Tkinter.Frame(parent)
w = Pmw.Group(radioframe,
tag_pyclass = Tkinter.Radiobutton,
tag_text='radiobutton 1',
tag_value = 0,
tag_variable = self.var)
w.pack(fill = 'both', expand = 1, side='left')
cw = Tkinter.Frame(w.interior(),width=200,height=20)
cw.pack(padx = 2, pady = 2, expand='yes', fill='both')
radiogroups.append(w)
w = Pmw.Group(radioframe,
tag_pyclass = Tkinter.Radiobutton,
tag_text='radiobutton 2',
tag_font = Pmw.logicalfont('Helvetica', 4),
tag_value = 1,
tag_variable = self.var)
w.pack(fill = 'both', expand = 1, side='left')
cw = Tkinter.Frame(w.interior(),width=200,height=20)
cw.pack(padx = 2, pady = 2, expand='yes', fill='both')
radiogroups.append(w)
radioframe.pack(padx = 6, pady = 6, expand='yes', fill='both')
Pmw.aligngrouptags(radiogroups)
w = Pmw.Group(parent,
tag_pyclass = Tkinter.Checkbutton,
tag_text='checkbutton',
tag_foreground='blue')
w.pack(fill = 'both', expand = 1, padx = 6, pady = 6)
cw = Tkinter.Frame(w.interior(),width=150,height=20)
cw.pack(padx = 2, pady = 2, expand='yes', fill='both')
w = Pmw.Group(parent,
tag_pyclass = Tkinter.Button,
tag_text='Tkinter.Button')
w.configure(tag_command = w.toggle)
w.pack(fill = 'both', expand = 1, padx = 6, pady = 6)
cw = Tkinter.Label(w.interior(),
background = 'aliceblue',
text = 'A group with\na Button tag!?'
)
cw.pack(padx = 2, pady = 2, expand='yes', fill='both')
w = Pmw.Group(parent,
tag_pyclass = Tkinter.Button,
tag_text='Show/Hide')
w.configure(tag_command = w.toggle)
w.pack(fill = 'both', expand = 1, padx = 6, pady = 6)
cw = Tkinter.Label(w.interior(),
background = 'aliceblue',
text = 'Now you see me.\nNow you don\'t.'
)
cw.pack(padx = 2, pady = 2, expand='yes', fill='both')
</pre>
</dd>
</dl>
<center><P ALIGN="CENTER">
<IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
</p></center>
<font size=-1>
<center><P ALIGN="CENTER">
Pmw 1.3 -
7 Aug 2007
- <a href="index.html">Home</a>
<br>Manual page last reviewed: 15 November 1998
</p></center>
</font>
</body>
</html>
|