如何在TraisUI中指定VSplit和HSplit的分流比?
How to specify the split ratio for VSplit or HSplit in TraisUI?
我的观点定义如下
DefaultView = View(
HSplit(
Item("figure", editor=MPLFigureEditor(toolbar=True),
show_label=False),
VGroup(
Item("draw_button", show_label=False)),
show_labels=False
),
width=800, height=600, title="Facial Triangles", resizable=True)
我查阅了HSplit的官方文档,发现有none属性或方法来指定初始分流比。
有没有指定初始分流比的方法?
从this discussion,我得到了方法:通过指定Item
的width
或height
属性。比如我上面的视图更新为:
DefaultView = View(
HSplit(
Item("figure", editor=MPLFigureEditor(toolbar=True), width=0.95,
show_label=False),
VGroup(
Item("draw_button", show_label=False)),
show_labels=False
),
width=800, height=600, title="Facial Triangles", resizable=True)
我的观点定义如下
DefaultView = View(
HSplit(
Item("figure", editor=MPLFigureEditor(toolbar=True),
show_label=False),
VGroup(
Item("draw_button", show_label=False)),
show_labels=False
),
width=800, height=600, title="Facial Triangles", resizable=True)
我查阅了HSplit的官方文档,发现有none属性或方法来指定初始分流比。
有没有指定初始分流比的方法?
从this discussion,我得到了方法:通过指定Item
的width
或height
属性。比如我上面的视图更新为:
DefaultView = View(
HSplit(
Item("figure", editor=MPLFigureEditor(toolbar=True), width=0.95,
show_label=False),
VGroup(
Item("draw_button", show_label=False)),
show_labels=False
),
width=800, height=600, title="Facial Triangles", resizable=True)