Handbook
Glossary
<grids-section> ( -- gadget )
Vocabulary
ui-demo
Inputs
None
Outputs
gadget
an
object
Definition
USING:
accessors
colors
ui.gadgets
ui.gadgets.grids
ui.gadgets.labels
;
IN:
ui-demo
::
<grids-section>
( -- gadget )
"Property"
<heading>
:>
h1
"Value"
<heading>
:>
h2
"Width"
<label>
:>
r1
"100 px"
<label>
:>
r2
"Height"
<label>
:>
r3
"50 px"
<label>
:>
r4
"Color"
<label>
:>
r5
"Blue"
<label>
:>
r6
COLOR:
DodgerBlue
{
60 30
}
<color-box>
:>
c1
COLOR:
MediumSeaGreen
{
90 30
}
<color-box>
:>
c2
COLOR:
chocolate1
{
45 30
}
<color-box>
:>
c3
COLOR:
HotPink
{
90 30
}
<color-box>
:>
c4
COLOR:
gold
{
45 30
}
<color-box>
:>
c5
COLOR:
MediumPurple
{
60 30
}
<color-box>
:>
c6
<section>
"A grid takes an array of rows, and gives every column the wid..."
<prose>
add-gadget
{
{
h1 h2
}
{
r1 r2
}
{
r3 r4
}
{
r5 r6
}
}
<grid>
{
24 4
}
>>gap
<pref-width>
add-gadget
"Cells need not be labels:"
<heading>
add-gadget
{
{
c1 c2 c3
}
{
c4 c5 c6
}
}
<grid>
{
4 4
}
>>gap
<pref-width>
add-gadget
<page>
;