这不起作用
panel1.layout: layout [
offset: 0x0
yuml-image: image img
]
panel2.layout: layout [
offset: 0x0
area (yuml-command0) yellow
]
panelbuttons.layout: layout [
button "Save" [request-save]
button "Refresh" [request-refresh]
button "Quit" [quit]
]
Main: layout [
panel1: box 640x300 white
return
panelbuttons: box 640x20
return
panel2: box 640x180 yellow
]
panel1/pane: panel1.layout
panel2/pane: panel2.layout
panelbuttons/pane: panelbuttons.layout
view/title/options center-face Main "askuml.com" [no-border]
我只想要相当于:
Main: layout [
offset: 0x0
yuml-image: image img
return
across
button "Save" [request-save]
button "Refresh" [request-refresh]
button "Quit" [quit]
return
area (yuml-command0) yellow
]
另外为什么我有一个边框,而我问偏移量0x0看到下面的丑陋灰色边框: alt text http://askuml.com/files/2010/07/uml-online-tool.gif
更新:现在我有这个丑陋的窗口 alt text http://askuml.com/files/2010/07/vid-ugly.gif
请参阅http://askuml.com/blog/yuml-use-case-desktop-client/
我现在更新了代码我看不到(甚至是你的:)按钮:
答案 0 :(得分:2)
你需要:
layout [
origin 0x0
...
]
您还可以space 0x0
和backcolor 238.234.221
免除灰色。我也偏爱改变区域边缘 - area edge [size: 1x1 effect: none]
其他一些选项:layout/tight [...]
(空格和原点0),layout/origin [...] 0x0
。
view/options [no-border]
指的是操作系统窗口。布局方言中的任何set-word!
都专门指向后续样式分配单词。
答案 1 :(得分:2)
我会说你的第一直觉是正确的,但会修改它:
Main: layout [
origin 0 space 6
yuml-image: image img 600x400
across pad 6
btn "Save" [request-save]
btn "Refresh" [request-refresh]
btn "Quit" [quit]
below
area (yuml-command0) yellow 600x200
]
如果你真的需要打破面板,那么让'面板样式解决这个问题:
image-panel: [
yuml-image: image 600x400 img
]
btn-panel: [
across origin 6 space 6
btn "Save" [request-save]
btn "Refresh" [request-refresh]
btn "Quit" [quit]
]
area-panel: [
area yellow 600x200
]
main: layout [
origin 0 space 0
panel image-panel
panel btn-panel
panel area-panel
]
答案 2 :(得分:1)
试试这个,
w: layout/size [backcolor red btn "test"] 300x300
v: layout/tight [box blue 100x100]
append w/pane v
view w
或使用insert而不是append将脸部放在其他人的后面:
insert w/pane v
答案 3 :(得分:1)
面板只是一个布局,没有别的。 您可以创建布局并将其添加到另一个布局的窗格,或者只使用面板样式。
http://www.rebol.com/how-to/subpanels.html
view layout [backcolor yellow size 200x200 origin 0x0 space 0x0 b: panel red [btn "test" lbl "Test"] return panel blue [btn "x" lbl "rest" lbl "x"]]
>> ? b
== B is an object of value:
type word! face ;<--- just a face
offset pair! 0x0
size pair! 36x49
span none! none
pane block! length: 2 ;<--- btn & lbl
...