Rebol Programming/clear-fields

USAGE:

edit
CLEAR-FIELDS panel 

DESCRIPTION:

edit

Clear all text fields faces of a layout.

CLEAR-FIELDS is a function value.

ARGUMENTS

edit
  • panel -- (Type: object)

SOURCE CODE

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