gui.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:StochOPy 作者: keurfonluu 项目源码 文件源码
def _scale(self, from_, to, resolution, variable, position, command = None,
               kwargs = {}):
        if command is None:
            command = lambda s: variable.set(round(float(s), 3))
        scale = ttk.Scale(self.frame1.sliders, from_ = from_, to = to, variable = variable,
                          orient = "horizontal", length = 20, command = command,
                          takefocus = False, **kwargs)
        if position == 1:
            scale.place(relwidth = 0.35, relx = 0, x = 0, y = 25, anchor = "nw")
        elif position == 2:
            scale.place(relwidth = 0.35, relx = 0, x = 0, y = 70, anchor = "nw")
        elif position == 3:
            scale.place(relwidth = 0.35, relx = 0.5, x = 0, y = 25, anchor = "nw")
        elif position == 4:
            scale.place(relwidth = 0.35, relx = 0.5, x = 0, y = 70, anchor = "nw")
        return scale
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号