跳至內容

Rebol 程式設計/request-list

來自華夏公益教科書,開放書籍,為開放世界
REQUEST-LIST titl alist /offset xy 

從列表中請求一個選擇。

REQUEST-LIST 是一個函式值。

  • titl -- (型別:字串)
  • alist -- (型別:塊)
  • /offset
    • xy -- (型別:任何)

原始碼

[編輯 | 編輯原始碼]
request-list: func [
    "Requests a selection from a list." 
    titl [string!] 
    alist [block!] /offset xy /local rslt list-lay
][
    list-lay: layout [
        origin 10x10 
        h3 titl 
        text-list data alist [rslt: value hide-popup] 
        btn-cancel #"^[" [rslt: none hide-popup]
    ] 
    rslt: none 
    either offset [inform/offset list-lay xy] [inform list-lay] 
    rslt
]
華夏公益教科書