How to draw a circle around a label?
Now I tried this:
public void drawUseCase(int width, int height, UseCase useCase)
{
Label lbUseCase = new Label();
Graphics g = lbUseCase.CreateGraphics();
Pen p = new Pen(Color.Black, 1);
g.DrawEllipse(p, width, height, 200, 200);
lbUseCase.Location = new System.Drawing.Point(width, height);
lbUseCase.Text = useCase.name;
mainPanel.Controls.Add(lbUseCase);
}
But that does not work. Any ideas?
This is in winforms. Since this does not work, I mean that only a shortcut appears, but there is no circle or anything like that.
Jamie source
share