Base class which defines methods common for all Nictk internal widgets (not windows nor menus). More...
Public Member Functions | |
def | __init__ (self, parent, x, y, w, h, pad, ctor, **kw) |
The constructor. More... | |
def | activate (self) |
Sets the state of the widget to NORMAL. More... | |
def | deactivate (self) |
Sets the state of the widget to DISABLED. More... | |
def | destroy (self) |
Overrides the BaseWidget method, unmapping the widget if its parent is a _embedVerFrame. More... | |
def | enabled (self) |
Returns True if the widget is enabled. More... | |
def | get_content (self) |
Returns the content of the widget as a string. More... | |
def | hide (self) |
Hides the widget. More... | |
def | init_content (self, content) |
Sets the content type for the widget. More... | |
def | resize (self, x=None, y=None, w=None, h=None, pad=None) |
Changes the dimensions of the widget. More... | |
def | set_content (self, content) |
Sets the content of the widget. More... | |
def | show (self) |
Shows a previously hidden widget. More... | |
def | visible (self) |
Returns True if the widget is visible. More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
def | winfo_h = winfo_height |
Alias for winfo_height() More... | |
def | winfo_w = winfo_width |
Alias for winfo_width() More... | |
Base class which defines methods common for all Nictk internal widgets (not windows nor menus).
It overrides the tkinter class.
def __init__ | ( | self, | |
parent, | |||
x, | |||
y, | |||
w, | |||
h, | |||
pad, | |||
ctor, | |||
** | kw | ||
) |
The constructor.
Reimplemented in Canvas, Text, Notebook, HorFrame, VerFrame, RowFrame, VerScrollFrame, RowScrollFrame, Label, Button, Entry, Checkbutton, Radiobutton, Listbox, Combobox, Scale, and Spinbox.
def activate | ( | self | ) |
Sets the state of the widget to NORMAL.
The widget can interact with mouse and keyboard. If the widget is a container all its children are set to NORMAL.
def deactivate | ( | self | ) |
Sets the state of the widget to DISABLED.
The widget is grayed and cannot interact with mouse and keyboard. If the widget is a container all its children are set to DISABLED.
def destroy | ( | self | ) |
Overrides the BaseWidget method, unmapping the widget if its parent is a _embedVerFrame.
So it triggers an <Unmap> event resizing the parent.
def enabled | ( | self | ) |
Returns True if the widget is enabled.
def get_content | ( | self | ) |
Returns the content of the widget as a string.
If the content is an image returns the string "image".
def hide | ( | self | ) |
Hides the widget.
The widget will not be displayed, but its data remain managed; use show() to newly display it.
def init_content | ( | self, | |
content | |||
) |
Sets the content type for the widget.
The set_content() and get_content() methods will then behave according to the type chosen. The warious widget constructors call this, so the user needs to call this only when he sets for the first time the widget content (if he didn't already it in the constructor).
content | can be a string, a StringVar or an image (BitmapImage, PhotoImage). |
def resize | ( | self, | |
x = None , |
|||
y = None , |
|||
w = None , |
|||
h = None , |
|||
pad = None |
|||
) |
Changes the dimensions of the widget.
Only the given values are updated. Be careful, because if you have packed other widgets with respect to this their position will change.
def set_content | ( | self, | |
content | |||
) |
Sets the content of the widget.
content | you must supply a content compatible with that given in init_content(). |
Reimplemented in Combobox.
def show | ( | self | ) |
Shows a previously hidden widget.
def visible | ( | self | ) |
Returns True if the widget is visible.