A User Drawn Tab allows the developer to take over complete control of the tab presentation in the control.
The User Drawn Tab event fires for each tab in the control when the TabStyle property is set to UserDrawn, allowing the developer to handle the drawing of the tab. The event passes an e argument that contains the following custom properties …
· e.Graphics (of type System.Drawing.Graphics): A handle to the graphics object responsible for drawing the control. Through the e.Graphics object the developer has access to the GDI+ methods for drawing objects to a display device.
· e.Rect (of type System.Drawing.Rectangle): A rectangle representing the area being painted in the control. The rectangle is defined by an X,Y coordinate (top left of rectangle) and a width and height of the area being painted. All values are in pixels.
· e.Selected (of type Boolean): Determines if this is the currently selected tab in the control.
· e.TabIndex (of type Integer): The index value of the current tab in the control's collection.
· e.TabPage (of type TabPage): A reference to the TabPage object of the tab being painted.
· e.UnderMouse (of type Boolean): Determines if the current tab is under the mouse.