# 创建滑动条scale = tkScaleroot2 from_=0 to=200 orient=tkHORIZONTAL length=150 label=距离阈值 command=set_distance_thresholdscalesetdistance_thresholdscalepack像这样建立复选框修改neighbors = 的值
创建复选框
checkbutton = tk.Checkbutton(root2, text='使用近邻筛选', variable=use_neighbors, command=set_use_neighbors) checkbutton.pack()
定义修改neighbors的函数
def set_use_neighbors(): global neighbors if use_neighbors.get(): neighbors = 10 else: neighbors = None
原文地址: https://www.cveoy.top/t/topic/eFFl 著作权归作者所有。请勿转载和采集!