Pmw.LabeledWidget() - frame with label
This megawidget consists of an interior frame with an associated label which can be positioned on any side of the frame. The programmer can create other widgets within the interior frame.
If None, a label component is not created. The default is None.
component('labelchildsite')
.
class Demo: def __init__(self, parent): # Create a frame to put the LabeledWidgets into frame = Tkinter.Frame(parent, background = 'grey90') frame.pack(fill = 'both', expand = 1) # Create and pack the LabeledWidgets. column = 0 row = 0 for pos in ('n', 'nw', 'wn', 'w'): lw = Pmw.LabeledWidget(frame, labelpos = pos, label_text = pos + ' label') lw.component('hull').configure(relief='sunken', borderwidth=2) lw.grid(column=column, row=row, padx=10, pady=10) cw = Tkinter.Button(lw.interior(), text='child\nsite') cw.pack(padx=10, pady=10, expand='yes', fill='both') # Get ready for next grid position. column = column + 1 if column == 2: column = 0 row = row + 1
Pmw 1.2 -
5 Aug 2003
- Home
Manual page last reviewed: 8 November 1998