开发者

smalltalk texteditor widget print new line

开发者 https://www.devze.com 2023-02-12 10:12 出处:网络
I am using Cincom VisualWorks and开发者_Go百科 using the TextEditor widget.I am able to write data to this widget but for the life of me, I am unable to print new line (or carraige return) characters.

I am using Cincom VisualWorks and开发者_Go百科 using the TextEditor widget. I am able to write data to this widget but for the life of me, I am unable to print new line (or carraige return) characters. Using "cr" as in for "Transcript: cr" doesn't work in this widget. Does anyone know what to do?


There is a method #setText:, and depending on the system you might need CR and LF:

myTextEditorWidget setText: 'line1', Character cr asString, Character lf asString, 'line2'.

if the #setText: method is not defined yet you can do so by adding this as an accessor to the class; say you told the UIBuilder that the text-field has name myText, then you can add the method:

myTextEditorWidget myText: 'line1', Character cr asString, Character lf asString, 'line2'.
0

精彩评论

暂无评论...
验证码 换一张
取 消