message window wrap

Discussions related to Visual Prolog
Post Reply
daveplummermd
Active Member
Posts: 61
Joined: 18 Jul 2006 17:18

message window wrap

Post by daveplummermd » 15 Apr 2018 22:22

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
Dave Plummer

User avatar
Thomas Linder Puls
VIP Member
Posts: 2310
Joined: 28 Feb 2000 0:01

Re: message window wrap

Post by Thomas Linder Puls » 16 Apr 2018 9:14

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,
Regards Thomas Linder Puls
PDC

daveplummermd
Active Member
Posts: 61
Joined: 18 Jul 2006 17:18

Re: message window wrap

Post by daveplummermd » 16 Apr 2018 9:35

Thanks Thomas
dave
Dave Plummer

Post Reply