Page 1 of 1

message window wrap

Posted: 15 Apr 2018 22:22
by daveplummermd
Guys
How does one set/change the word-wrap value (force text to wrap) in the standard message window, like that created in any supplied example? ( I can maximize, I cant seem to wrap)

typical code.....

Code: Select all

onShow(_Source, _CreationData) :-         Obj = messageForm::display(This),         MessageControl = Obj:getMessageControl(),          documentWindow::setMaximized(true),         !.
Thanks in advance.

dave

Re: message window wrap

Posted: 16 Apr 2018 9:14
by Thomas Linder Puls
You will need to fetch the sciLexer from the message control and then set the wrapMode property on that:

Code: Select all

properties     wrapMode : integer.     % Set wrapMode to (sciLexer_native::sc_wrap_*):     % sc_wrap_none (0) to disable line wrapping,     % sc_wrap_word (1) to enable wrapping on word or style boundaries     % sc_wrap_char (2) to enable wrapping between any characters, and     % sc_wrap_whitespace (3) to enable wrapping on whitespace.     % sc_wrap_char is preferred for Asian languages where there is no white space between words.
E.g.:

Code: Select all

        MessageForm = messageForm::display(This),         MessageControl = MessageForm:getMessageControl(),         SciLexer = MessageControl:sciLexer,         SciLexer:wrapMode := sciLexer_native::sc_wrap_word,

Re: message window wrap

Posted: 16 Apr 2018 9:35
by daveplummermd
Thanks Thomas
dave