Rebol迭代面截断文本



使用以下代码:

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
            ]
        ]
    ]
]

超出'this line已截断>'的所有文本都不会显示在显示窗口上。我该怎么解决这个问题?

经过很多痛苦的挖掘,这里是如何不让文本列表从你的文本中截断单词列表。添加"段落:[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 ]
    ]
]

相关内容

  • 没有找到相关文章

最新更新