GUI- Layout commands


across

below

return

Return while in across mode:

Return while in below mode:

space

Sets the new spacing offset which will be used for placement of following faces.

origin

Sets the offset of the first face from the upper left corner of the window's panel.

at

Places the next face at an absolute position. This positioning mode only affects the next following face, and does not change the layout flow position. So, the following faces, after the next one, will be placed again in the continuity of the previous ones in the layout flow.

pad

Modifies the layout current position by a relative offset. All the following faces on the same row (or column) are affected.

do

This is the same do from the Other useful things chapter. In this case, it is used to run regular code inside your view.

You can do this:

Red [needs: 'view]
a: 33 + 12
print a               ;prints on console
view [
    text "hello"
     ]

But this will give you an error:

Red [needs: 'view]
view [
    text "hello"
    a: 33 + 12        ;ERROR!!!
    print a
    ]

Inside the view, you must code:

Red [needs: 'view]
view [
text "hello"
do [a: 33 + 12 print a] ;OK!
]

results matching ""

    No results matching ""