C# Class Hawkeye.UI.Controls.CustomTabControl

Owner-drawn tab control
Inheritance: System.Windows.Forms.TabControl
Mostra file Open project: odalet/Hawkeye2

Protected Properties

Property Type Description
DefaultBorderColor Color
DefaultTextColor Color

Private Properties

Property Type Description
GetTabImage Image
PaintAllTabs void
ShouldPaintTabSeparator bool

Public Methods

Method Description
CustomTabControl ( ) : System

Initializes a new instance of the CustomTabControl class.

Protected Methods

Method Description
GetPath ( int index ) : GraphicsPath

Gets a graphics path representing how to draw the tab at the specified index.

In this implementation, tab are drawn as square.

OnPaint ( PaintEventArgs e ) : void

Raises the E:System.Windows.Forms.Control.Paint event.

OnPaintBackground ( PaintEventArgs pevent ) : void

Paints the background of the control.

OnResize ( EventArgs e ) : void

This member overrides M:System.Windows.Forms.Control.OnResize(System.EventArgs).

PaintSelectedTab ( PaintEventArgs e ) : void

Paints the selected tab.

PaintTab ( PaintEventArgs e, int index ) : void

Paints the tab at the specified index.

PaintTabBorder ( Graphics g, int index, GraphicsPath path ) : void

Paints the border of the tab at the specified object.

PaintTabPageBorder ( PaintEventArgs e ) : void

Paints the tab page border.

PaintTabSeparator ( PaintEventArgs e, int index ) : void

Paints the tab separator at the specified index.

PaintTabText ( Graphics g, int index ) : void

Paints the text of the tab at the specified index.

Private Methods

Method Description
GetTabImage ( int index ) : Image
PaintAllTabs ( PaintEventArgs e ) : void

Paints all tabs.

ShouldPaintTabSeparator ( int index ) : bool

Get a value indicating if we should paint a tab separator before the tab identified by the index index.

Method Details

CustomTabControl() public method

Initializes a new instance of the CustomTabControl class.
public CustomTabControl ( ) : System
return System

GetPath() protected method

Gets a graphics path representing how to draw the tab at the specified index.
In this implementation, tab are drawn as square.
protected GetPath ( int index ) : GraphicsPath
index int The tab index.
return System.Drawing.Drawing2D.GraphicsPath

OnPaint() protected method

Raises the E:System.Windows.Forms.Control.Paint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A that contains the event data.
return void

OnPaintBackground() protected method

Paints the background of the control.
protected OnPaintBackground ( PaintEventArgs pevent ) : void
pevent PaintEventArgs A that contains information about the control to paint.
return void

OnResize() protected method

This member overrides M:System.Windows.Forms.Control.OnResize(System.EventArgs).
protected OnResize ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
return void

PaintSelectedTab() protected method

Paints the selected tab.
protected PaintSelectedTab ( PaintEventArgs e ) : void
e PaintEventArgs The instance containing the event data.
return void

PaintTab() protected method

Paints the tab at the specified index.
protected PaintTab ( PaintEventArgs e, int index ) : void
e PaintEventArgs The instance containing the event data.
index int The tab index.
return void

PaintTabBorder() protected method

Paints the border of the tab at the specified object.
protected PaintTabBorder ( Graphics g, int index, GraphicsPath path ) : void
g System.Drawing.Graphics The graphics object on which to paint.
index int The tab index.
path System.Drawing.Drawing2D.GraphicsPath The graphics path representing the tab border.
return void

PaintTabPageBorder() protected method

Paints the tab page border.
protected PaintTabPageBorder ( PaintEventArgs e ) : void
e PaintEventArgs The instance containing the event data.
return void

PaintTabSeparator() protected method

Paints the tab separator at the specified index.
protected PaintTabSeparator ( PaintEventArgs e, int index ) : void
e PaintEventArgs The instance containing the event data.
index int The index.
return void

PaintTabText() protected method

Paints the text of the tab at the specified index.
protected PaintTabText ( Graphics g, int index ) : void
g System.Drawing.Graphics The graphics object on which to paint.
index int The tab index.
return void

Property Details

DefaultBorderColor protected_oe property

protected Color DefaultBorderColor
return Color

DefaultTextColor protected_oe property

protected Color DefaultTextColor
return Color