Module Tkinter :: Class Wm

[show private | hide private]
[frames | no frames]

## Class Wm

Known Subclasses:
  `Toplevel`

Provides functions for the communication with the window manager.

Method Summary
| ``aspect`(self, minNumer, minDenom, maxNumer, maxDenom)` Instruct the window manager to set the aspect ratio (width/height) of this widget to be between MINNUMER/MINDENOM and MAXNUMER/MAXDENOM.
| ``client`(self, name)` Store NAME in WM_CLIENT_MACHINE property of this widget.
| ``colormapwindows`(self, *wlist)` Store list of window names (WLIST) into WM_COLORMAPWINDOWS property of this widget.
| ``command`(self, value)` Store VALUE in WM_COMMAND property.
| ``deiconify`(self)` Deiconify this widget.
| ``focusmodel`(self, model)` Set focus model to MODEL.
| ``frame`(self)` Return identifier for decorative frame of this widget if present.
| ``geometry`(self, newGeometry)` Set geometry to NEWGEOMETRY of the form =widthxheight+x+y.
| ``grid`(self, baseWidth, baseHeight, widthInc, heightInc)` Instruct the window manager that this widget shall only be resized on grid boundaries.
| ``group`(self, pathName)` Set the group leader widgets for related widgets to PATHNAME.
| ``iconbitmap`(self, bitmap)` Set bitmap for the iconified widget to BITMAP.
| ``iconify`(self)` Display widget as icon.
| ``iconmask`(self, bitmap)` Set mask for the icon bitmap of this widget.
| ``iconname`(self, newName)` Set the name of the icon for this widget.
| ``iconposition`(self, x, y)` Set the position of the icon of this widget to X and Y.
| ``iconwindow`(self, pathName)` Set widget PATHNAME to be displayed instead of icon.
| ``maxsize`(self, width, height)` Set max WIDTH and HEIGHT for this widget.
| ``minsize`(self, width, height)` Set min WIDTH and HEIGHT for this widget.
| ``overrideredirect`(self, boolean)` Instruct the window manager to ignore this widget if BOOLEAN is given with 1.
| ``positionfrom`(self, who)` Instruct the window manager that the position of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".
| ``protocol`(self, name, func)` Bind function FUNC to command NAME for this widget.
| ``resizable`(self, width, height)` Instruct the window manager whether this width can be resized in WIDTH or HEIGHT.
| ``sizefrom`(self, who)` Instruct the window manager that the size of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".
| ``state`(self, newstate)` Query or set the state of this widget as one of normal, icon, iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only).
| ``title`(self, string)` Set the title of this widget.
| ``transient`(self, master)` Instruct the window manager that this widget is transient with regard to widget MASTER.
| ``withdraw`(self)` Withdraw this widget from the screen such that it is unmapped and forgotten by the window manager.
| ``wm_aspect`(self, minNumer, minDenom, maxNumer, maxDenom)` Instruct the window manager to set the aspect ratio (width/height) of this widget to be between MINNUMER/MINDENOM and MAXNUMER/MAXDENOM.
| ``wm_client`(self, name)` Store NAME in WM_CLIENT_MACHINE property of this widget.
| ``wm_colormapwindows`(self, *wlist)` Store list of window names (WLIST) into WM_COLORMAPWINDOWS property of this widget.
| ``wm_command`(self, value)` Store VALUE in WM_COMMAND property.
| ``wm_deiconify`(self)` Deiconify this widget.
| ``wm_focusmodel`(self, model)` Set focus model to MODEL.
| ``wm_frame`(self)` Return identifier for decorative frame of this widget if present.
| ``wm_geometry`(self, newGeometry)` Set geometry to NEWGEOMETRY of the form =widthxheight+x+y.
| ``wm_grid`(self, baseWidth, baseHeight, widthInc, heightInc)` Instruct the window manager that this widget shall only be resized on grid boundaries.
| ``wm_group`(self, pathName)` Set the group leader widgets for related widgets to PATHNAME.
| ``wm_iconbitmap`(self, bitmap)` Set bitmap for the iconified widget to BITMAP.
| ``wm_iconify`(self)` Display widget as icon.
| ``wm_iconmask`(self, bitmap)` Set mask for the icon bitmap of this widget.
| ``wm_iconname`(self, newName)` Set the name of the icon for this widget.
| ``wm_iconposition`(self, x, y)` Set the position of the icon of this widget to X and Y.
| ``wm_iconwindow`(self, pathName)` Set widget PATHNAME to be displayed instead of icon.
| ``wm_maxsize`(self, width, height)` Set max WIDTH and HEIGHT for this widget.
| ``wm_minsize`(self, width, height)` Set min WIDTH and HEIGHT for this widget.
| ``wm_overrideredirect`(self, boolean)` Instruct the window manager to ignore this widget if BOOLEAN is given with 1.
| ``wm_positionfrom`(self, who)` Instruct the window manager that the position of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".
| ``wm_protocol`(self, name, func)` Bind function FUNC to command NAME for this widget.
| ``wm_resizable`(self, width, height)` Instruct the window manager whether this width can be resized in WIDTH or HEIGHT.
| ``wm_sizefrom`(self, who)` Instruct the window manager that the size of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".
| ``wm_state`(self, newstate)` Query or set the state of this widget as one of normal, icon, iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only).
| ``wm_title`(self, string)` Set the title of this widget.
| ``wm_transient`(self, master)` Instruct the window manager that this widget is transient with regard to widget MASTER.
| ``wm_withdraw`(self)` Withdraw this widget from the screen such that it is unmapped and forgotten by the window manager.

Method Details

### aspect(self, minNumer=None, minDenom=None, maxNumer=None, maxDenom=None)

Instruct the window manager to set the aspect ratio (width/height) of this widget to be between MINNUMER/MINDENOM and MAXNUMER/MAXDENOM. Return a tuple of the actual values if no argument is given.

### client(self, name=None)

Store NAME in WM_CLIENT_MACHINE property of this widget. Return current value.

### colormapwindows(self, *wlist)

Store list of window names (WLIST) into WM_COLORMAPWINDOWS property of this widget. This list contains windows whose colormaps differ from their parents. Return current list of widgets if WLIST is empty.

### command(self, value=None)

Store VALUE in WM_COMMAND property. It is the command which shall be used to invoke the application. Return current command if VALUE is None.

### deiconify(self)

Deiconify this widget. If it was never mapped it will not be mapped. On Windows it will raise this widget and give it the focus.

### focusmodel(self, model=None)

Set focus model to MODEL. "active" means that this widget will claim the focus itself, "passive" means that the window manager shall give the focus. Return current focus model if MODEL is None.

### frame(self)

Return identifier for decorative frame of this widget if present.

### geometry(self, newGeometry=None)

Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return current value if None is given.

### grid(self, baseWidth=None, baseHeight=None, widthInc=None, heightInc=None)

Instruct the window manager that this widget shall only be resized on grid boundaries. WIDTHINC and HEIGHTINC are the width and height of a grid unit in pixels. BASEWIDTH and BASEHEIGHT are the number of grid units requested in Tk_GeometryRequest.

### group(self, pathName=None)

Set the group leader widgets for related widgets to PATHNAME. Return the group leader of this widget if None is given.

### iconbitmap(self, bitmap=None)

Set bitmap for the iconified widget to BITMAP. Return the bitmap if None is given.

### iconify(self)

Display widget as icon.

### iconmask(self, bitmap=None)

Set mask for the icon bitmap of this widget. Return the mask if None is given.

### iconname(self, newName=None)

Set the name of the icon for this widget. Return the name if None is given.

### iconposition(self, x=None, y=None)

Set the position of the icon of this widget to X and Y. Return a tuple of the current values of X and X if None is given.

### iconwindow(self, pathName=None)

Set widget PATHNAME to be displayed instead of icon. Return the current value if None is given.

### maxsize(self, width=None, height=None)

Set max WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.

### minsize(self, width=None, height=None)

Set min WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.

### overrideredirect(self, boolean=None)

Instruct the window manager to ignore this widget if BOOLEAN is given with 1. Return the current value if None is given.

### positionfrom(self, who=None)

Instruct the window manager that the position of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".

### protocol(self, name=None, func=None)

Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW".

### resizable(self, width=None, height=None)

Instruct the window manager whether this width can be resized in WIDTH or HEIGHT. Both values are boolean values.

### sizefrom(self, who=None)

Instruct the window manager that the size of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".

### state(self, newstate=None)

Query or set the state of this widget as one of normal, icon, iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only).

### title(self, string=None)

Set the title of this widget.

### transient(self, master=None)

Instruct the window manager that this widget is transient with regard to widget MASTER.

### withdraw(self)

Withdraw this widget from the screen such that it is unmapped and forgotten by the window manager. Re-draw it with wm_deiconify.

### wm_aspect(self, minNumer=None, minDenom=None, maxNumer=None, maxDenom=None)

Instruct the window manager to set the aspect ratio (width/height) of this widget to be between MINNUMER/MINDENOM and MAXNUMER/MAXDENOM. Return a tuple of the actual values if no argument is given.

### wm_client(self, name=None)

Store NAME in WM_CLIENT_MACHINE property of this widget. Return current value.

### wm_colormapwindows(self, *wlist)

Store list of window names (WLIST) into WM_COLORMAPWINDOWS property of this widget. This list contains windows whose colormaps differ from their parents. Return current list of widgets if WLIST is empty.

### wm_command(self, value=None)

Store VALUE in WM_COMMAND property. It is the command which shall be used to invoke the application. Return current command if VALUE is None.

### wm_deiconify(self)

Deiconify this widget. If it was never mapped it will not be mapped. On Windows it will raise this widget and give it the focus.

### wm_focusmodel(self, model=None)

Set focus model to MODEL. "active" means that this widget will claim the focus itself, "passive" means that the window manager shall give the focus. Return current focus model if MODEL is None.

### wm_frame(self)

Return identifier for decorative frame of this widget if present.

### wm_geometry(self, newGeometry=None)

Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return current value if None is given.

### wm_grid(self, baseWidth=None, baseHeight=None, widthInc=None, heightInc=None)

Instruct the window manager that this widget shall only be resized on grid boundaries. WIDTHINC and HEIGHTINC are the width and height of a grid unit in pixels. BASEWIDTH and BASEHEIGHT are the number of grid units requested in Tk_GeometryRequest.

### wm_group(self, pathName=None)

Set the group leader widgets for related widgets to PATHNAME. Return the group leader of this widget if None is given.

### wm_iconbitmap(self, bitmap=None)

Set bitmap for the iconified widget to BITMAP. Return the bitmap if None is given.

### wm_iconify(self)

Display widget as icon.

### wm_iconmask(self, bitmap=None)

Set mask for the icon bitmap of this widget. Return the mask if None is given.

### wm_iconname(self, newName=None)

Set the name of the icon for this widget. Return the name if None is given.

### wm_iconposition(self, x=None, y=None)

Set the position of the icon of this widget to X and Y. Return a tuple of the current values of X and X if None is given.

### wm_iconwindow(self, pathName=None)

Set widget PATHNAME to be displayed instead of icon. Return the current value if None is given.

### wm_maxsize(self, width=None, height=None)

Set max WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.

### wm_minsize(self, width=None, height=None)

Set min WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.

### wm_overrideredirect(self, boolean=None)

Instruct the window manager to ignore this widget if BOOLEAN is given with 1. Return the current value if None is given.

### wm_positionfrom(self, who=None)

Instruct the window manager that the position of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".

### wm_protocol(self, name=None, func=None)

Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW".

### wm_resizable(self, width=None, height=None)

Instruct the window manager whether this width can be resized in WIDTH or HEIGHT. Both values are boolean values.

### wm_sizefrom(self, who=None)

Instruct the window manager that the size of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".

### wm_state(self, newstate=None)

Query or set the state of this widget as one of normal, icon, iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only).

### wm_title(self, string=None)

Set the title of this widget.

### wm_transient(self, master=None)

Instruct the window manager that this widget is transient with regard to widget MASTER.

### wm_withdraw(self)

Withdraw this widget from the screen such that it is unmapped and forgotten by the window manager. Re-draw it with wm_deiconify.

Generated by Epydoc 1.1 on Sat Feb 15 21:17:46 2003 | http://epydoc.sf.net