A collection of useful tkinter widgets.
Project description
A collection of useful Tkinter widgets and mega-widgets.
This package contains:
- CollapsiblePane:
A LabelFrame derivitive that can be collapsed by clicking on the label.
- LabelButton:
A Label derivitive that is clickable like a button, with rollovers and focus.
- TabbedNoteBook:
A notebook that provides Safari-style tabs, with optional close-buttons per tab.
- Wizard:
A wizard dialog with Prev/Next/Finish/Cancel buttons, which progresses through multiple panes of widgets.
CollapsiblePane
Example code:
from belfrywidgets.collapsiblepane import CollapsiblePane
tk = Tk()
cp = CollapsiblePane(
tk,
text="Click Here to Collapse",
visible=True,
collapsible=True,
)
cp.pack(side=TOP, fill=BOTH, expand=1, padx=5, pady=5)
lbl1 = Label(cp.holder, text="This is a label.")
lbl2 = Label(cp.holder, text="This is another label.")
lbl1.pack(side=TOP)
lbl2.pack(side=TOP)
tk.mainloop()
TabbedNoteBook
Example code:
from belfrywidgets.tabbednotebook import TabbedNoteBook
def _closeit(name):
print("Close tab %s" % name)
return True # Return True to allow closing tab.
tk = Tk()
tnb = TabbedNoteBook(tk, width=640, height=480)
tnb.pack_propagate(False) # Keep noteboox from shrinking to fit contents.
tnb.pack(side=TOP, fill=BOTH, expand=1)
pane1 = tnb.add_pane(
'one', 'First Pane',
closecommand=lambda: _closeit('one')
)
lbl1 = Label(pane1, text="This is a label.")
lbl1.pack(side=TOP, fill=BOTH, expand=1)
pane2 = tnb.add_pane(
'two', 'Second Pane',
closecommand=lambda: _closeit('two')
)
lbl2 = Label(pane2, text="This is a second label.")
lbl2.pack(side=TOP, fill=BOTH, expand=1)
pane3 = tnb.add_pane(
'three', 'Third Pane',
closecommand=lambda: _closeit('three')
)
lbl3 = Label(pane3, text="This is a third label.")
lbl3.pack(side=TOP, fill=BOTH, expand=1)
tk.mainloop()
Wizard
Example code:
from belfrywidgets.wizard import Wizard
def _finish():
print("Finish")
def _cancel():
print("Cancel")
root = Tk()
wiz = Wizard(
width=640,
height=480,
cancelcommand=_cancel,
finishcommand=_finish,
)
pane1 = wiz.add_pane('one', 'First')
lbl1 = Label(pane1, text="This is the first pane.")
lbl1.pack(side=TOP, fill=BOTH, expand=1)
pane2 = wiz.add_pane('two', 'Second')
lbl2 = Label(pane2, text="This is the second pane.")
lbl2.pack(side=TOP, fill=BOTH, expand=1)
pane3 = wiz.add_pane('three', 'Third')
lbl3 = Label(pane3, text="This is the third pane.")
lbl3.pack(side=TOP, fill=BOTH, expand=1)
root.wm_withdraw()
root.wait_window(wiz)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file belfrywidgets-0.9.3.tar.gz.
File metadata
- Download URL: belfrywidgets-0.9.3.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f15b928558ced20ce78d5289d105d1003301f1aafdd69f48b703a9a939ab337
|
|
| MD5 |
c9319122547e366d30b34d84fcffed42
|
|
| BLAKE2b-256 |
cc90204edeb48d68662b4b01db9b1c14abd888794ca4ab247fb46aa8382a6dd0
|
File details
Details for the file belfrywidgets-0.9.3-py2.py3-none-any.whl.
File metadata
- Download URL: belfrywidgets-0.9.3-py2.py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
481e429fd0168de168f8e762b88e05b54d68ddab9ec84eb818e2c7c6e49cdb4a
|
|
| MD5 |
6ac3f4c39117bce74f0de7073b7c5539
|
|
| BLAKE2b-256 |
5f208c9823e2d34f6ba0eebc614b9feab1d9fc9af5cad226dccb38fbd7aab29e
|