Discussions related to Visual Prolog
rasvprolog
Active Member
Posts: 31
Joined: 1 May 2014 3:28

Changing Message Window Font

Unread post 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.
FR
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post 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)),         ...
Regards Thomas Linder Puls
PDC
rasvprolog
Active Member
Posts: 31
Joined: 1 May 2014 3:28

Unread post by rasvprolog »

Thanks Thomas.
FR
Post Reply