Skip to content

Commit

Permalink
Adding documentation for multi-slot frame
Browse files Browse the repository at this point in the history
  • Loading branch information
slightlynybbled committed May 1, 2018
1 parent 83d0792 commit f905a37
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/widget_groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ The screenshot consists of three individual examples of ``KeyValueEntry`` widget

.. autoclass:: groups.Calendar
:members:

``MultiSlotFrame``
------------------

.. image:: img/multi-slot-frame.png

.. autoclass:: groups.MultiSlotFrame
:members:
19 changes: 17 additions & 2 deletions tk_tools/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,9 +891,24 @@ def get(self):


class MultiSlotFrame(ttk.Frame):
"""
r"""
Can hold several removable elements,
such as a list of files or directories.
such as a list of files, directories,
or a checklist.::
# create and grid the frame
msf = tk_tools.MultiSlotFrame(root)
msf.grid()
# add some items
msf.add('item 1')
msf.add('item 2')
# get any user-entered or modified values
print(msf.get())
:param parent: the tk parent frame
:param columns: the number of user columns (defaults to 1)
"""
def __init__(self, parent, columns=1):
self._parent = parent
Expand Down

0 comments on commit f905a37

Please sign in to comment.