跳转到内容

Rebol 编程/clear-fields

来自维基教科书,自由的教科书
CLEAR-FIELDS panel 

清除布局中所有文本字段的面板。

CLEAR-FIELDS 是一个函数值。

  • panel -- (类型: 对象)

源代码

[编辑 | 编辑源代码]
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
        ]
    ]
]
华夏公益教科书