I tried to improve the Tip Calculator example a bit, so that "Total: " doesn't disappear when you hit enter on the tip field:
REBOL [title: "Tip Calculator"]
view [
f: field "49.99"
hpanel [
t: field "20" on-action [
set-face x rejoin ["Total: " round/to to money! ((to-decimal get-face f) * ((to-decimal get-face t) * .01 + 1)) $.01 ]
]
title "%"
]
x: title "Total: " facets [ auto-size true ]
]
However, the auto-size
doesn't seem to help the fact that x
stays too skinny after calculation. This works:
x: title "Total: " 150x20
...as does this:
x: title "Total: "
...but how can I get it to resize automatically?