Posted: Sun Oct 04, 2020 5:40 am Post subject: Changing Class Components Color At The Run Time
This is very simple tutorial which everyone can do it without learns 12 years or more.
Since I have seen many peoples created their own CE Game Trainer and arranged the trainer with some colors, but I never saw they use 'ColorBox' which can use to change the trainer class components color at the run time.
So, this is a simple script to show how to using ColorBox and link the ColorBox change to change a color label on a form.
Code:
function createColorBox(Parent)
local box = createComponentClass('TColorBox', Parent)
box.Parent = Parent
return box
end
if f then f.Destroy() end
f = createForm()
f.Position = 'poScreenCenter'
f.Caption = 'Color Box Tester'
f.Color = 0xffffff -- white
function colorboxChange(sender)
label1.Font.Color = clrbox.Selected
end
f.Show()
clrbox.OnChange = colorboxChange
On the example, if we select a color on the color box then the label color also change according to the selected color.
You can use the method to change other components on your game trainer form including the form itself. _________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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 cannot download files in this forum