2

使用此代码:

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 tuncated>' 之外的所有文本都不会显示在显示窗口上。我该如何解决这个问题?

4

1 回答 1

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 ]
    ]
]
于 2014-08-18T05:18:05.460 回答