Rebol Programming/set-style

From Wikibooks, open books for an open world
< Rebol Programming
Jump to navigation Jump to search

USAGE:[edit | edit source]

SET-STYLE name new-face /styles ss 

DESCRIPTION:[edit | edit source]

Set a style by its name.

SET-STYLE is a function value.

ARGUMENTS[edit | edit source]

  • name -- (Type: word)
  • new-face -- (Type: object)

REFINEMENTS[edit | edit source]

  • /styles
    • ss -- Stylesheet (Type: any)

SOURCE CODE[edit | edit source]

set-style: func [
    "Set a style by its name." 
    name [word!] 
    new-face [object!] 
    /styles ss "Stylesheet" 
    /local here
    if none? styles [ss: vid-styles] 
    either here: find ss name [change next here new-face] [repend ss [name new-face]]