使按钮在标签框架中粘贴顶部和底部(AppJar Python)

问题描述 投票:-2回答:1

我试图让按钮水平排列而不是在AppJar中并排排列,但我无法让它工作

到目前为止我试过这个:

    dashboard.startLabelFrame("Exams", row=2, column=0, colspan=1)
    dashboard.setSticky("ns")
    dashboard.addButtons(["Create exam", "Modify exams", "Delete exams"], None)
    dashboard.stopLabelFrame()

我使用setSticky方法尝试使其粘贴到标签框架的北部和南部,但仍然没有什么区别。

python user-interface tkinter
1个回答
0
投票

.addButtons()功能旨在专门对齐按钮。

如果你想在彼此之上添加按钮,那么使用多次调用.addButton()

dashboard.startLabelFrame("Exams", row=2, column=0, colspan=1)
dashboard.setSticky("ns")
dashboard.addButton("Create exam", None)
dashboard.addButton("Modify exams", None)
dashboard.addButton("Delete exams", None)
dashboard.stopLabelFrame()
© www.soinside.com 2019 - 2024. All rights reserved.