An Introduction to Tkinter
前页 | Chapter 45. Toplevel Window Methods | 后页

# Property Access Methods

## client

`client(name)`, `client()`. Set (get) the WM_CLIENT_MACHINE property. This property is used by window managers under the X window system. It is ignored on other platforms.

To remove the property, set it to an empty string.

## colormapwindows

`colormapwindows(wlist...)`, `colormapwindows()`. Set (get) the WM_COLORMAP_WINDOWS property. This property is used by window managers under the X window system. It is ignored on other platforms.

## command

`command(value)`, `command()`. Set (get) the WM_COMMAND property. This property is used by window managers under the X window system. It is ignored on other platforms.

To remove the property, set it to an empty string.

## focusmodel

`focusmodel(model)`, `focusmodel()`. Set (get) the focus model.

## frame

`frame()`. Return a string containing a system-specific window identifier corresponding to self's outermost parent. For Unix, this is the X window identifier. For Windows, this is the HWND cast to a long integer.

Note that if the window hasn't been reparented by the window manager, this method returns the window identifier corresponding to self.

## positionfrom

`positionfrom(who)`, `positionfrom()`. Set (get) the position controller.

## protocol

`protocol(name, function)`. Register function as a callback which will be called for the given protocol. The name argument is typically one of BWM_DELETE_WINDOW (the window is about to be deleted), WM_SAVE_YOURSELF (called by X window managers when the application should save a snapshot of its working set) or WM_TAKE_FOCUS (called by X window managers when the application receives focus).

## sizefrom

`sizefrom(who)`, `sizefrom()`. Set (get) the size controller.

前页 | Home | 后页
Icon Methods | Up | Index