Base class for windows and widgets. More...
Public Member Functions | |
def | bind (self, sequence=None, func=None, add=None) |
Redefines the tk.Misc.bind() method. More... | |
def | config (self, cnf=None, **kw) |
Configures resources of a widget. More... | |
def | get_config (self, key) |
Returns the value for the key resource. More... | |
def | get_winfo (self, key) |
Returns the widget info for the item key. More... | |
def | has_option (self, opt=None) |
Returns True if the widget admits the given option. More... | |
def | parent (self) |
Returns the widget parent. More... | |
def | toplevel (self) |
Returns the widget toplevel container (a Window or Main). More... | |
def | unbind (self, sequence, funcid=None) |
Redefines the tk.Misc.unbind() method. More... | |
def | winfo_bh (self) |
Returns the height of the widget bounding box. More... | |
def | winfo_bpad (self) |
Returns the list of the four pad amounts (E-N-W-S) of the widget with respect to its bounding box. More... | |
def | winfo_bw (self) |
Returns the width of the widget bounding box. More... | |
def | winfo_bx (self) |
Returns the x coordinate of the widget bounding box topleft corner. More... | |
def | winfo_by (self) |
Returns the y coordinate of the widget bounding box topleft corner. More... | |
def | winfo_height (self) |
Returns the widget height. More... | |
def | winfo_width (self) |
Returns the widget width. More... | |
def | winfo_x (self) |
Returns the x coordinate of the topleft corner of the widget with respect to the parent. More... | |
def | winfo_y (self) |
Returns the y coordinate of the topleft corner of the widget with respect to the parent. More... | |
Static Public Attributes | |
def | winfo_h = winfo_height |
Alias for winfo_height() More... | |
def | winfo_w = winfo_width |
Alias for winfo_width() More... | |
Base class for windows and widgets.
It defines methods common for windows and interior widgets, it is used only as a mixin (you should not use it directly). It doesn't inherit from tk.Misc, because it's always mixed in with other classes that already do it.
def bind | ( | self, | |
sequence = None , |
|||
func = None , |
|||
add = None |
|||
) |
Redefines the tk.Misc.bind() method.
This allows events bound with the bind() method (and not only with the command option, as in tkinter) to be ignored when the widget is in DISABLED state
def config | ( | self, | |
cnf = None , |
|||
** | kw | ||
) |
Configures resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys(). This method redefine tkinter config() to allow some changes in resource names; for detail see Widgets properties.
cnf,kw | the options. |
def get_config | ( | self, | |
key | |||
) |
def get_winfo | ( | self, | |
key | |||
) |
Returns the widget info for the item key.
key | a string which indicates what we want to know. See Getting widget informations for a list |
def has_option | ( | self, | |
opt = None |
|||
) |
Returns True if the widget admits the given option.
opt | if you leave None the method returns a list of all its options as strings. If you give an option (string) returns True or False |
def parent | ( | self | ) |
Returns the widget parent.
def unbind | ( | self, | |
sequence, | |||
funcid = None |
|||
) |
Redefines the tk.Misc.unbind() method.
This allows a correct unbinding for some class with particular bindings.
def winfo_bh | ( | self | ) |
Returns the height of the widget bounding box.
See winfo_bx() for details.
def winfo_bpad | ( | self | ) |
Returns the list of the four pad amounts (E-N-W-S) of the widget with respect to its bounding box.
def winfo_bw | ( | self | ) |
Returns the width of the widget bounding box.
See winfo_bx() for details
def winfo_bx | ( | self | ) |
Returns the x coordinate of the widget bounding box topleft corner.
def winfo_by | ( | self | ) |
Returns the y coordinate of the widget bounding box topleft corner.
See winfo_bx() for details.
def winfo_height | ( | self | ) |
def winfo_width | ( | self | ) |
def winfo_x | ( | self | ) |
Returns the x coordinate of the topleft corner of the widget with respect to the parent.
It redefines the tk function, because it returns wrong values until you call update() or update_idletasks(), while this gives the value calculated by the constructor.
def winfo_y | ( | self | ) |
Returns the y coordinate of the topleft corner of the widget with respect to the parent.
See winfo_x() for details.
|
static |
Alias for winfo_height()
|
static |
Alias for winfo_width()