跳至内容

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
]
华夏公益教科书