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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使按钮在标签框架中粘贴顶部和底部(AppJar Python)相关的知识,希望对你有一定的参考价值。

我试图让按钮水平排列而不是在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方法尝试使其粘贴到标签框架的北部和南部,但仍然没有什么区别。

答案

.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()

以上是关于使按钮在标签框架中粘贴顶部和底部(AppJar Python)的主要内容,如果未能解决你的问题,请参考以下文章

中心按钮标签栏

当按钮覆盖在tableview顶部时,如何防止tableview单元注册一个tap?

标签栏固定:底部。从纵向过渡到横向后,按钮会稍微向右移动

如何使按钮静态并固定在底部

如何将按钮固定到视图 Storyboard iOS 的底部

如何将UIButton粘贴到UIScrollView的底部? (Chatto框架)