FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


Changing Message Window Font

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog
View previous topic :: View next topic  
Author Message
rasvprolog



Virginia-USA
Joined: 01 May 2014
Posts: 8

PostPosted: 29 Mar 2017 18:30    Post subject: Changing Message Window Font Reply with quote

Hello To Visual Prolog Community,

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

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
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3124

PostPosted: 1 Apr 2017 22:20    Post subject: Reply with quote

You will have to set the font on the messageControl that is inside the messageForm:

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


_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
rasvprolog



Virginia-USA
Joined: 01 May 2014
Posts: 8

PostPosted: 1 Apr 2017 23:14    Post subject: Reply with quote

Thanks Thomas.
_________________
FR
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum