Storage widgets#
HintedEntry#
Text#
- class tkclasswiz.storage.Text(master=None, cnf={}, **kw)#
Modified version of :class`tkinter.Text`, which replaces the original
getmethod to contain no parameters and instead return the entire text stripped. This is for compatibility with other storage widgets.
ListBoxObjects#
- class tkclasswiz.storage.ListBoxObjects(*args, **kwargs)#
Modified version of
tkinter.Listbox, which:Allows copy-paste and also sets the standard keyboard shortcuts for it
Implements the
currentmethod for compatibility withtkclasswiz.storage.ComboBoxObjectsOverwrites the
getmethod to return the original objects instead of textModifies the
insertmethod to insert original objects instead of text
- get(first: int = 0, last: int | None = None) list#
Returns elements from
firsttolast(not included).
- insert(index: str | int, *elements: str | float) None#
Inserts
elementstoindex. Theindexmust be a numerical index or tkinter.END (‘end’).
- delete_selected()#
Deletes selected elements.
- save_to_clipboard()#
Saves selection to clipboard.
- paste_from_clipboard()#
Paste elements from clipboard.
ListBoxScrolled#
- class tkclasswiz.storage.ListBoxScrolled(parent, *args, **kwargs)#
A scrollable version of
tkclasswiz.storage.ListBoxObjects. All the methods are the same astkclasswiz.storage.ListBoxObjects.
ComboBoxObjects#
- class tkclasswiz.storage.ComboBoxObjects(*args, **kwargs)#
Modified version of
tkinter.Combobox, which:Allows copy-paste and also sets the standard keyboard shortcuts for it
Overwrites the
getmethod to return the original objects instead of textModifies the
insertmethod to insert original objects instead of text
- save_to_clipboard()#
Saves selected element to Clipboard.
- paste_from_clipboard()#
Paste element(s) from clipboard.
ComboEditFrame#
- class tkclasswiz.storage.ComboEditFrame(edit_method: Callable, values: List[Any] = [], master=None, *args, **kwargs)#
Frame, which combines
tkclasswiz.storage.ComboBoxObjectsand an edit button. The edit button will open an object edit window / wizard and load in the old object (ObjectInfo) data.- Parameters:
edit_method (Callable) – Function that opens the object edit window. This should either be
tkclasswiz.object_frame.window.ObjectEditWindow.open_object_edit_frame(),tkclasswiz.object_frame.frame_base.NewObjectFrameBase.new_object_frame()or a function that calls one of the previous 2 methods - this can be used to eg. load extra values intotkclasswiz.object_frame.frame_base.NewObjectFrameStruct’s comboboxes by passing in theadditional_valuesmapping.values (list[Any]) – List of values that the combobox will have.
master (Optional[
tkinter.Widget]) – The master widget.args – Extra positional arguments to pass to
tkinter.Frame`kwargs – Extra keyword arguments to pass to
tkinter.Frame`