I update my Lazarus from 1.64 to 2.04 and now when I loaded this project I worked on I get conversion errors.
LBLog.Items.AddObject(PText,TObject(PColor));
I did this and then
procedure TFormLog.LBLogDrawItem(Control: TWinControl; Index: Integer;
ARect: TRect; State: TOwnerDrawState);
begin
with Control as TListBox do
begin
Canvas.FillRect(ARect);
Canvas.Font.Color := TColor(Items.Objects[Index]);
Canvas.TextOut(ARect.Left + 2, ARect.Top, Items[Index]);
end;
end;
To have a Listbox with differently colored lines (Which serves as a Log in my program, Red = Error etc.).
I guess it's some compatibility thing maybe ?
But why shouldn't I be able to add a color as an object when basically everything is on object, right ?
What's going on.
Also it worked perfectly before but I'm not sure if I had some IDE options that I don't have now because it's been ages since I set up 1.64 and i never touched anything since besides loading some packages.
Thank you very much for your time, Amadeus.