I want to draw in a panel with this method:
protected override void InitOutput(object output)
{
if (output is Control)
{
Control c = (Control)output;
g.FillRectangle(hb, 7, 10, 30 - 19, 5);
...
}
With a text I can do this:
protected override void InitOutput(object output)
{
if (output is Control)
{
Control c = (Control)output;
lbl.Name = "lbl";
lbl.Size = new System.Drawing.Size(10, 10);
lbl.TabIndex = 5;
lbl.Text = "test";
panel.Location = new System.Drawing.Point(1, 1);
panel.Name = "panelSys";
panel.Size = new System.Drawing.Size(20, 20);
panel.TabIndex = 5;
panel.Controls.Add(lbl);
c.Controls.Add(panelSys);
}
Hope you can help me
thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…