H
Hilton
Hi,
Why does this not show anything? [The rectangle *is* being drawn.]
Oh, also why does DrawRoundedRectangle fill the area? This seems
inconsistent with other Draw methods.
protected override void OnPaint (PaintEventArgs pea)
{
base.OnPaint (pea);
GraphicsEx gex = GraphicsEx.FromControl (this);
gex.DrawRectangle (new PenEx (Color.Blue), 10, 10, 200, 30);
// This *is* being drawn
FontEx fontEx = new FontEx ("Arial", 10.0f, FontStyle.Regular);
for (int i = 1; i < 5; i++)
{
Rectangle rect = new Rectangle (0, 0, i * 50, i * 50);
gex.DrawString ("test", fontEx, Color.Black, rect);
this.Text = i.ToString(); // To verify that exception are
not being thrown; "4" ends up being shown in the title bar
}
fontEx.Dispose ();
gex.Dispose ();
}
Thanks,
Hilton
Why does this not show anything? [The rectangle *is* being drawn.]
Oh, also why does DrawRoundedRectangle fill the area? This seems
inconsistent with other Draw methods.
protected override void OnPaint (PaintEventArgs pea)
{
base.OnPaint (pea);
GraphicsEx gex = GraphicsEx.FromControl (this);
gex.DrawRectangle (new PenEx (Color.Blue), 10, 10, 200, 30);
// This *is* being drawn
FontEx fontEx = new FontEx ("Arial", 10.0f, FontStyle.Regular);
for (int i = 1; i < 5; i++)
{
Rectangle rect = new Rectangle (0, 0, i * 50, i * 50);
gex.DrawString ("test", fontEx, Color.Black, rect);
this.Text = i.ToString(); // To verify that exception are
not being thrown; "4" ends up being shown in the title bar
}
fontEx.Dispose ();
gex.Dispose ();
}
Thanks,
Hilton