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.

ARGUMENTSEdit

  • panel -- (Type: object)

SOURCE CODEEdit

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
        ]
    ]
]
Last modified on 27 October 2012, at 22:15