C# Class SIL.FieldWorks.Common.Widgets.VSTabControl

This class supports rendering of TabControl correctly when using bottom alignment with visual styles enabled. When ones are disabled the default method of rendering is used. Adapted from XPTabControl by Vladimir Svyatsky.
Inheritance: System.Windows.Forms.TabControl
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Свойство Type Description
DrawCustomTabControl void
DrawTabItem void
GetImageByIndexOrKey Image
HitTest int
InitializeDrawMode void

Méthodes publiques

Méthode Description
VSTabControl ( ) : System

Initializes a new instance of the T:VSTabControl class.

Méthodes protégées

Méthode Description
OnFontChanged ( EventArgs e ) : void

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

OnHandleCreated ( EventArgs e ) : void

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

OnPaint ( PaintEventArgs e ) : void

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

WndProc ( Message &m ) : void

This member overrides M:System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message@).

Private Methods

Méthode Description
DrawCustomTabControl ( Graphics g, Rectangle clipRect ) : void

Draws our tab control.

DrawTabItem ( Graphics g, int index, TabItemState state, Rectangle tabRect, StringFormat textFmt ) : void

Draws certain tab.

GetImageByIndexOrKey ( int index, string key ) : Image

This function attempts to get tab image by index first or if not set then by key.

HitTest ( ) : int

Gets hot tab index.

InitializeDrawMode ( ) : void

Turns custom drawing on/off and sets native font for the control (it's required for tabs to adjust their size correctly). If one doesn't install native font manually then Windows will install ugly system font for the control.

Method Details

OnFontChanged() protected méthode

Raises the E:System.Windows.Forms.Control.FontChanged event.
protected OnFontChanged ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
Résultat void

OnHandleCreated() protected méthode

This member overrides M:System.Windows.Forms.Control.OnHandleCreated(System.EventArgs).
protected OnHandleCreated ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
Résultat void

OnPaint() protected méthode

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

VSTabControl() public méthode

Initializes a new instance of the T:VSTabControl class.
public VSTabControl ( ) : System
Résultat System

WndProc() protected méthode

This member overrides M:System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message@).
protected WndProc ( Message &m ) : void
m System.Windows.Forms.Message A Windows Message Object.
Résultat void