rebol vid 面板和偏移 0x0 的问题

发布于 2024-09-14 03:59:39 字数 1460 浏览 4 评论 0原文

这不起作用,

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 看到下面丑陋的灰色边框: 替代文本 http://askuml.com/files/2010/07/ uml-online-tool.gif

更新:现在我有这个丑陋的窗口 替代文本 http://askuml.com/files/2010/07/vid- ugly.gif

请参阅http://askuml.com/blog /yuml-use-case-desktop-client/

我现在更新了代码,我看不到(甚至是你的:))按钮:

替代文字

This doesn't work

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]

I just wanted the equivalent of this:

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
]

Also why do I have a border whereas I asked offset 0x0 see the ugly grey border below:
alt text http://askuml.com/files/2010/07/uml-online-tool.gif

Update: now I have this ugly window
alt text http://askuml.com/files/2010/07/vid-ugly.gif

see http://askuml.com/blog/yuml-use-case-desktop-client/

I updated the code now I can't see the (even your :)) buttons:

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

迷爱 2024-09-21 03:59:39

我想说你的第一直觉是正确的,但会这样修改它:

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
]

I'd say your first instinct was correct, but would modify it thus:

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
]

If you really need to break up the panels, let the 'panel style do the heavy lifting:

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
]
青瓷清茶倾城歌 2024-09-21 03:59:39

您需要:

layout [
    origin 0x0
    ...
]

您还需要 space 0x0backcolor 238.234.221 来消除灰色。我也偏向于更改区域边缘 - 区域边缘 [大小:1x1 效果:无]

其他一些选项:布局/紧密 [...] (空格和原点 0),布局/原点 [...]0x0

view/options [no-border] 指操作系统窗口。布局方言中的任何set-word!特指为后续样式分配一个单词。

You need:

layout [
    origin 0x0
    ...
]

You also have space 0x0 and backcolor 238.234.221 to dispense with the grey. I'm partial to changing the area edge as well - area edge [size: 1x1 effect: none]

Some other options: layout/tight [...] (space and origin 0), layout/origin [...] 0x0.

view/options [no-border] refers to the OS window. Any set-word! in the layout dialect specifically refers to assigning a word to the subsequent style.

一向肩并 2024-09-21 03:59:39

试试这个,

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

try this,

w: layout/size [backcolor red btn "test"] 300x300
v: layout/tight [box blue 100x100]
append w/pane v
view w

or use insert instead of append to put the face behind of others:

insert w/pane v
迎风吟唱 2024-09-21 03:59:39

面板只是一个布局,没有别的。
您可以创建布局并将它们添加到另一个布局的窗格中,或者仅使用面板样式。

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

Panel is just a layout, nothing else.
You can create layouts and adds them to another layout's pane, or just use panel style.

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
...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文