Rasied before the text of a button is drawn.
Syntax
Event Data
The event handler receives an argument of type UserDrawnButtonTextEventArgs containing data related to this event. The following UserDrawnButtonTextEventArgs properties provide information specific to this event.
| Property | Description |
|---|
| ButtonState | Gets the state of the button to be drawn. |
| CalculatorButton | Gets the button being drawn. |
| Font | Gets or sets the font of the button text being drawn. |
| ForeColor | Gets or sets the color used to paint the text in the button. |
| Graphics | A handle to the graphics object used to draw the button. |
| PaintText | Determines if the internal routines of the control should draw the button's text. When the PaintText property is set to False the control does not execute its internal paint routine and the developer has control over the drawing of the button's text. |
| Rect | A rectangle representing the area of the button in the control. |
| Text | Gets or sets the text string to be be drawn in the button. |
Remarks
Requirements
Target Platforms: Current Windows operating system with .NET 8.
See Also