如何很好地对齐列:
可以做的事情:
view layout [
title "How to align ?"
panel [
text "" text "col1" text "col2"
]
return
panel [
text "very short" field "" field ""
]
return
panel [
text "short" field "" field ""
]
]
事情出错:
view layout [
title "How to align ?"
panel [
text "" text "col1" text "col2"
]
return
panel [
text "very short" field "" field ""
]
return
panel [
text "short" field "" field ""
]
return
panel [
text "but if very very long" field "" field ""
]
]
后续问题:如何缩小行之间的空间?
答案 0 :(得分:1)
您需要将面板做成列而不是行,然后给它们指定可以满足您需要的特定宽度。
view layout [
title "How to align ?"
panel 120x300 [
text "" return
text "very short" return
text "short" return
text "but if very very long" return
]
panel 120x300 [
text "col1" return
field return
field return
field return
]
panel 120x300 [
text "col2" return
field return
field return
field return
]
]