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 


Change color of text when ticking a checkbox (Forms, LUA)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
lepa666
How do I cheat?
Reputation: 0

Joined: 11 Jan 2021
Posts: 6

PostPosted: Mon Jan 11, 2021 3:41 am    Post subject: Change color of text when ticking a checkbox (Forms, LUA) Reply with quote

Hello, I'm very new to lua and just wanted to ask, how do I make the
color of text change when ticking a checkbox. (Green for activated and red for deactivated). And yes it's a label. Thanks in advance!

_________________
Yeah that's fucked...
Back to top
View user's profile Send private message
Skyrimfus
Cheater
Reputation: 1

Joined: 17 Mar 2016
Posts: 43

PostPosted: Thu Jan 21, 2021 11:57 am    Post subject: Reply with quote

Code:
f = createForm()
l = createLabel(f)
l.Caption = "Random label"
l.Top = 50
c = createCheckBox(f)
c.Caption = "Click me"
c.OnClick = function()
if c.Checked then
 l.Font.Color = 0x00FF00
else
 l.Font.Color = 0x0000FF
end

end

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