Rebol迭代了截断文本

时间:2014-08-16 07:11:18

标签: rebol rebol2

使用此代码:

view layout [
    t: text-list  "this line truncated> lfkjsdflksjfslfsdjfsdlldskjflsdkfj" with [
        text-pane: func [face id][
            if pair? id [return 1 + second id / iter/size] 
            iter/offset: iter/old-offset: id - 1 * iter/size * 0x1 
            if iter/offset/y + iter/size/y > size/y [return none] 
            cnt: id: id + sn 
            if iter/text: pick data id [
                iter/font/color: 255.0.0
                lines: at data id 
                iter
            ]
        ]
    ]
]

此行以外的所有文字都被点击>'没有显示在显示窗口上。 我该如何解决这个问题?

1 个答案:

答案 0 :(得分:3)

经过这里的大量痛苦挖掘后,如何不从你的文本列表截断单词 名单。添加" para:[wrap?:false] "如下图所示:

view layout [
    t: text-list  "this line truncated> lfkjsdflksjfslfsdjfsdlldskjflsdkfj" with [
        text-pane: func [face id][
            if pair? id [return 1 + second id / iter/size] 
            iter/offset: iter/old-offset: id - 1 * iter/size * 0x1 
            if iter/offset/y + iter/size/y > size/y [return none] 
            cnt: id: id + sn 
            if iter/text: pick data id [
                iter/font/color: 255.0.0
                lines: at data id 
                iter
            ]
        ]
        para: [ wrap?: false ]
    ]
]