| | |
- builtins.object
-
- AccountSelector
- AccountTypeSelection
class AccountSelector(builtins.object) |
| |
AccountSelector(root, receiver)
Widget providing a list selection for Accounts
Parameters
-----------
receiver
A receiver object that is informed of any change in selection.
The receiver must support a method, `got_selection(str)`
frame : tkinter.Frame
The tkinter `Frame` this component is contained in
listbox : tkinter.Listbox
list box to populate with stock item references |
| |
Methods defined here:
- __init__(self, root, receiver)
- Create a new `AccountSelector`
Parameters
----------
root
The parent frame or window to attach this component to
receiver
Object to send a message to when the selection changes.
Must support a method `got_selection(str)`
Raises
------
AttributeError
raised if `receiver` does not support `got_selection`
- populate_listbox(self, accounts)
- Populate the Listbox with a list of Accounts
Parameters
----------
accounts : list[Account]
a list of accounts to add to the selection
Returns
-------
None
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class AccountTypeSelection(builtins.object) |
| |
AccountTypeSelection(root, values)
Class for selecting an account type
Provides a drop-down option menu for selecting an account type and
a button for confirming a choice. Will then prompt a dialog for the
user to create that account type
Attributes
----------
frame
parent widget
receiver
object to be notified when a new account is created. Must
support the `account_created(account)` method |
| |
Methods defined here:
- __init__(self, root, values)
- Create a new `AccountTypeSelection` widget
Parameters
----------
root
parent widget
values : list[str]
values to populate the option menu with, corresponding
to `Account` class acount_type values
Raises
------
AttributeError
raised if receiver does not support the `account_created(account)` method
- get(self)
- Get the currently selected option
Returns
-------
str
Currently selected account option
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
| |