Text faces – h1, text, field, and area

Here is a window using text faces:

Here is the code to produce that window (note that in a real app we must give our widgets meaningful names, instead of t1 and f1!):

; see Chapter09/text-faces.red:view [    title "Text faces"    below    h3 "Heading 3"    t1: text 300x30 bold italic blue font-name "algerian"         font-color ivory font-size 14 "Text with properties"    text "Click me!" [face/color: orange face/text: "FIRE!"]    f1: field 300 "Type something here" [ print [f1/data] ]    a: area 300x100 [print a/text]]

To show text in a window, use the text face. Some basic h1, h2 to h5 text styles for headings are available, ...

Get Learn Red - Fundamentals of Red now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.