垂直排列盒對齊我將文本框,數字編輯框和按鈕框組合在一個對齊的框對齊中,但最終得到的顯示不一定是筆直的(請參見快照)。 有沒有辦法解決這個問題,使每個框成比例對齊?
new window("Test",
line up box(ncol(3),
Text box("Variable 1"),Number edit box(0),Button box("Create Column"),
Text box("Variable 2"),Number edit box(0),TExt box(""),
Text box("Variable 3"),Number edit box(0),Button box("Create Column")
)
)圖形學腳本編寫回复:排隊盒的垂直對齊不同的對象具有不同的尺寸,所以我要做的是使用間隔盒進行調整

new window( "Test",
line up box( N Col( 2 ),
V List Box(
Spacer Box( size( 0, 2 ) ),
H List Box(
Text Box( "Variable 1" ),
Number Edit Box( 0 )
)
),
Button Box( "Create Column" ),
H List Box(
Text Box( "Variable 2" ),
Number Edit Box( 0 )
),
Text Box( "" ),
V List Box(
Spacer Box( size( 0, 2 ) ),
H List Box(
Text Box( "Variable 3" ),
Number Edit Box( 0 )
)
),
Button Box( "Create Column" )
)
)