Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to change font size on a form using Lua?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Thu Feb 25, 2016 11:27 am    Post subject: How to change font size on a form using Lua? Reply with quote

Is it possible to change font size using Lua?

Code:

local mylabel = createLabel(myform)
 mylabel.Caption = "Test Test Test"
 mylabel.BorderSpacing.Around = 20
-----------------------then I want to set font size, is it possible? If so, then how? Thanks a lot.


Follow up question: if changing font size is possible, is changing font color also possible? Thanks.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Feb 25, 2016 11:46 am    Post subject: Reply with quote

Code:
 local font=mylabel.Font
 font.Size = 12
 font.Color = 0xff0000
 font.Name = 'Comic Sans MS'

_________________
Back to top
View user's profile Send private message MSN Messenger
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Thu Feb 25, 2016 11:49 am    Post subject: Reply with quote

mgr.inz.Player wrote:
Code:
 local font=mylabel.Font
 font.Size = 12
 font.Color = 0xff0000
 font.Name = 'Comic Sans MS'


Its you again and thanks again!
Follow up question:
How to make some part of the strings in one color and the other part in a different color? Very Happy
Back to top
View user's profile Send private message
elusiveness
Newbie cheater
Reputation: 1

Joined: 16 Feb 2016
Posts: 22

PostPosted: Mon Feb 29, 2016 2:16 pm    Post subject: Reply with quote

fmanager wrote:

How to make some part of the strings in one color and the other part in a different color? Very Happy


I belive you can't, the best way would be to put two labels, and define a different color and text for each.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites