As you can see, from an idea to a real code. You are doing great.
If you change the parent of the SimpleControl, using your "Switch" button, you'll notice it changes its color. On Windows when I moved the form outside the screen and brought it back slowly, the SimpleControl had different colors at the same time. Check the attached image.
Canvas has a procedure Canvas.TextOut to draw text. Try to use it to print the word "Test" on the SimpleControl.
كلامكـ صحيح ،فعند الضغط على switch أدّى ذلكـ إلى نقل الـ control بلون مُختلف في كلّ مرّةٍ بين الـ panel والـ form ،ولكن لم أصل إلى تأثير في الألوان مثل الذي في الصورة التي أرفقتَها.
عموماً ،حاولتُ طباعة نصٍ كما أخبرتني ويبدو كلّ شيء صحيحاً إلّا أنّني لا أرى نصّاً قد طُبع ووضعت إحداثيّات جُزافيّةً في TextOut ظنّاً منّي أنّ ذلكـ يُدخل النّص في حيّز الـ control ولكنّني في الحقيقة لا أعرف كيفيّة تحديد موقع نصٍّ داخل الـ control بعد.
google translate:
"You are correct, when pressing switch led to the transfer of the control in a different color each time between the panel and the form, but I did not reach an effect on colors like the one in the picture that you attached.
In general, I tried to print text as you told me and everything seems correct except that I do not see a text printed and put random coordinates into TextOut because I thought that this puts the text in the control
field "zone", but I really do not know how to locate a text inside the control yet."
procedure TForm1.Button1Click(Sender: TObject);
begin
test:=TSimpleControl.Create(panel1); //<--- "self" is the form itself, will be the "owner" of the component. It will free the component when the form is closed.
test.Parent:=self; //<--- where this component sits. Again, on the form. A panel could be used.
test.Canvas.TextOut(10,10,'Test');
end;