Page 1 of 1

Changing Message Window Font

Posted: 29 Mar 2017 18:30
by rasvprolog
Hello To Visual Prolog Community,

I am trying to change the message window's font. I use the following clause:

Code: Select all

clauses    onShow(_, _CreationData):-     This:setState([wsf_maximized]),     This:setFont(vpi::fontCreateByName("Tahoma", 14)),    _MessageForm = messageForm::display(This),writef("Instructions").
I don't get any error message but the font remains unchanged (the default font).

I would appreciate your feedback.

Posted: 1 Apr 2017 22:20
by Thomas Linder Puls
You will have to set the font on the messageControl that is inside the messageForm:

Code: Select all

clauses     onShow(_, _CreationData) :-         MessageForm = messageForm::display(This),         MC = MessageForm:getMessageControl(),         MC:setFont(vpi::fontCreateByName("Tahoma", 14)),         ...

Posted: 1 Apr 2017 23:14
by rasvprolog
Thanks Thomas.