Posted: Mon Jan 11, 2021 3:41 am Post subject: Change color of text when ticking a checkbox (Forms, LUA)
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! _________________
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
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