How in Delphi7 to change the color of an ellipse if there are for example 5 images of different colors, or can it be organized differently (without images)?
1 answer
If you use canvas, you can read this article first . There everything is described in detail:
"... Canvas - an object of the TCanvas class has many methods that allow you to draw graphs, lines, shapes using the Pen property. Pen. This property is an object that in turn has a number of properties. One of them is the Color property you already know. the second property is Width (line width). The width is specified in pixels ... "
And in order to change the color of the drawings made on the canvas, they will have to be redrawn. For this, the whole canvas is cleared (it seems so, I don’t remember exactly :))
Canvas.Brush.Color:=clBtnFace; // тут цвет, каким будет зачищена вся выбранная канва Canvas.FillRect(Canvas.ClipRect);
And then draw your ellipses with the right colors.
In general, the Internet gives a lot of information on request "Delphi canvas"