[REBOL] Re: How to change the font of a button ?
From: patrick:philipot:laposte at: 30-Jun-2024 22:31
Merci maxim
C'était clair et préçis et parfaitement adapté ŕ mes besoins. Oui, Rebol est
cool!
Cordialement
Patrick
----- Original Message -----
From: Maxim Olivier-Adlhoch <[maximo--meteorstudios--com]>
To: <[rebol-list--rebol--com]>
Sent: Monday, June 30, 2003 8:21 PM
Subject: [REBOL] Re: How to change the font of a button ?
I usually create my fonts in advance and switch between the different
versions dynamically, in order to reduce the amount of ram being used by
each face.
try this:
gui: layout [
abutton: button "rebol est cool" 150x30 [face/font: either ((face/font) font-a) [:font-b][:font-a]
show face]
]
font-a: make abutton/font [
size: 12
]
font-b: make font-a [
size: 18
]
abutton/font: font-a
view gui
by clicking on the button, you should toggle between each font each time you
press on the button...
The reason I built the layout before the font is that the vid button style
adds the /colors attribute to the font object... by makin a font from the
allocated button, the fonts created are sure to have any other custom
attributes added by the style.
-maxim