Reputation: 21
I dynamically add several TImage
controls to a TPanel
, and want to draw lines between them, but TPanel
does not have Canvas
. You can draw on a TPaintBox
, but I cannot use TImage
smiles on it. Tell me how to get out of this simple situation.
Upvotes: 0
Views: 748
Reputation: 21
I have dealt with this issue
// before describing the form class in the h-file:
namespace CanvasPanel
{
class TPanel : public Extctrls::TPanel
{
public:
__property Canvas;
};
}
#define TPanel CanvasPanel::TPanel
// next - the form class, and everything is unchanged...
class TForm1 : public TForm
Upvotes: 1