I need to make an inscription on TShape. I have a class in the fields of which there is a shape. In the class constructor, I create a shape. TShape is created on the panel whose property is visible = false;
procedure TShape.Paint; var s : string; begin inherited; s := inttostr(tag); with Canvas do TextOut((Width - TextWidth(s)) div 2, (Height - TextHeight(s)) div 2, s); end; This code does not work if the panel is visible = false; Why? What is the way out of this situation? the number of class instances will be large, so I don’t want to create a label and so on.