I'm using the OnGetColors event of the TColorBox component, but I can't figure out how add new colors using the Items property of the item parameter of the Event.
procedure (Sender: TCustomColorBox; Items: TStrings) of object;
How I must add new colors to the TColorBox using the Items property?
you must use the AddObject
method of the Items object, like so :
procedure TForm1.ColorBox1GetColors(Sender: TCustomColorBox; Items: TStrings);
begin
Items.AddObject('clWebSnow',TObject(clWebSnow));
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With