tkinter scroll extra
Project description
tkscrollutil
ScrolllArea
可以快速地为水平滚动、垂直滚动组件设置滚动条
属性
autohidescrollbars
设置组件是否自动隐藏滚动条。布尔数值。默认False
。也就是说,当你把鼠标指针放到滚动条上时,滚动条才会显示。
lockinterval
设置组件滚动条地锁定间隔。整数数值。默认300
.
respectheader
仅当将嵌入到组件内地tablelist
版本为6.5及以上版本时才能使用,后续等开发出tablelist
的扩展库时补充
respecttitlecolumns
仅当将嵌入到组件内地tablelist
版本为6.5及以上版本时才能使用,后续等开发出tablelist
的扩展库时补充
xscrollbarmode
设置水平滚动条的模式。可选值为static
dynamic
none
。默认none
。static
为常驻滚动条;dynamic
为自动滚动条;none
为没有滚动条
yscrollbarmode
设置垂直滚动条的模式。可选值为static
dynamic
none
。默认static
。static
为常驻滚动条;dynamic
为自动滚动条;none
为没有滚动条
示例
from tkinter import Tk, Listbox
from tkscrollutil import ScrollArea
Window = Tk()
Area = ScrollArea(Window)
List = Listbox(Area)
for Item in range(50):
List.insert(Item+1, Item+1)
Area.setwidget(List)
Area.pack(fill="both", expand="yes")
Window.mainloop()
ttkScrollArea
见上方。与ScrollArea
不同的是,ttkScrollArea
具有ttk组件的属性,并且ScrollArea
和ttkScrollArea
不能同时使用。
示例
from tkinter import Tk, Listbox
from tkscrollutil import ttkScrollArea
Window = Tk()
Area = ttkScrollArea(Window)
List = Listbox(Area)
for Item in range(50):
List.insert(Item+1, Item+1)
Area.setwidget(List)
Area.pack(fill="both", expand="yes")
Window.mainloop()
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
tkscrollutil-1.0.117.tar.gz
(81.6 kB
view hashes)
Built Distribution
Close
Hashes for tkscrollutil-1.0.117-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 507c44744ef445bdd3e08c74e5586c276a375e1b00a51e6c7a228d97ed5df537 |
|
MD5 | 0d251db6318849474000e77ed0722160 |
|
BLAKE2b-256 | 7b6d86c981cfd8a8c84f6a95588aa03adf54c4e16a040a844c5ed308e3a98d8d |