I've got an inherited control where I want the user to be able to specify a
color property. Using that color, I'm drawing a line
private m_UserDefinedCo lor as Color
.....
Dim g as Graphics=this.C reateGraphics
Dim myPen as Pen = new Pen(m_UserDefin edColor)
g.DrawLine(myPe n, X1, Y, X2 - 1, Y)
Then I want to draw a triangle filled with the same color. I set the point
and do:
g.FillPolygon(B rushes.Red, leftTriangle);
Because I can't figure out how to create a Brush that has the userdefined
color.
It's not possible to do: myBrush as Brush = new Brush(m_UserDef inedColor)
How do you specify the Brush Color in this case?
Cheers,
Johnny J.
color property. Using that color, I'm drawing a line
private m_UserDefinedCo lor as Color
.....
Dim g as Graphics=this.C reateGraphics
Dim myPen as Pen = new Pen(m_UserDefin edColor)
g.DrawLine(myPe n, X1, Y, X2 - 1, Y)
Then I want to draw a triangle filled with the same color. I set the point
and do:
g.FillPolygon(B rushes.Red, leftTriangle);
Because I can't figure out how to create a Brush that has the userdefined
color.
It's not possible to do: myBrush as Brush = new Brush(m_UserDef inedColor)
How do you specify the Brush Color in this case?
Cheers,
Johnny J.
Comment