跳轉到內容

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
        ]
    ]
]
華夏公益教科書