C# Class GitForce.RichTextBoxEx

Courtesy of: http://www.codeproject.com/KB/edit/RichTextBoxLinks.aspx
Inheritance: System.Windows.Forms.RichTextBox
Datei anzeigen Open project: gdevic/GitForce

Private Properties

Property Type Description
GetSelectionStyle int
InsertLink void
InsertLink void
SendMessage System.IntPtr
SetSelectionLink void
SetSelectionStyle void

Public Methods

Method Description
AppendText ( string text, Color color ) : void
GetSelectionLink ( ) : int

Get the link style for the current selection

InsertLink ( string text ) : void

Insert a given text as a link into the RichTextBox at the current insert position.

InsertLink ( string text, string hyperlink ) : void

Insert a given text at at the current input position as a link. The link text is followed by a hash (#) and the given hyperlink text, both of them invisible. When clicked on, the whole link text and hyperlink string are given in the LinkClickedEventArgs.

RichTextBoxEx ( ) : System

Private Methods

Method Description
GetSelectionStyle ( UInt32 mask, UInt32 effect ) : int
InsertLink ( string text, int position ) : void

Insert a given text at a given position as a link.

InsertLink ( string text, string hyperlink, int position ) : void

Insert a given text at a given position as a link. The link text is followed by a hash (#) and the given hyperlink text, both of them invisible. When clicked on, the whole link text and hyperlink string are given in the LinkClickedEventArgs.

SendMessage ( IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam ) : IntPtr
SetSelectionLink ( bool link ) : void

Set the current selection's link style

SetSelectionStyle ( UInt32 mask, UInt32 effect ) : void

Method Details

AppendText() public method

public AppendText ( string text, Color color ) : void
text string
color Color
return void

GetSelectionLink() public method

Get the link style for the current selection
public GetSelectionLink ( ) : int
return int

InsertLink() public method

Insert a given text as a link into the RichTextBox at the current insert position.
public InsertLink ( string text ) : void
text string Text to be inserted
return void

InsertLink() public method

Insert a given text at at the current input position as a link. The link text is followed by a hash (#) and the given hyperlink text, both of them invisible. When clicked on, the whole link text and hyperlink string are given in the LinkClickedEventArgs.
public InsertLink ( string text, string hyperlink ) : void
text string Text to be inserted
hyperlink string Invisible hyperlink string to be inserted
return void

RichTextBoxEx() public method

public RichTextBoxEx ( ) : System
return System