Rebol Programming/clear-fields

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

USAGE:[edit | edit source]


DESCRIPTION:[edit | edit source]

Clear all text fields faces of a layout.

CLEAR-FIELDS is a function value.

ARGUMENTS[edit | edit source]

  • panel -- (Type: object)

SOURCE CODE[edit | edit source]

clear-fields: func [
    "Clear all text fields faces of a layout." 
    panel [object!]
    if not all [in panel 'type panel/type = 'face] [exit] 
    foreach face panel/pane [
        if all [series? face/text flag-face? face field] [
            clear face/text 
            face/line-list: none