C# Class RichTextBoxLinks.RichTextBoxEx

Inheritance: System.Windows.Forms.RichTextBox
Datei anzeigen Open project: AlexandrSurkov/PKStudio

Private Properties

Property Type Description
GetSelectionStyle int
SendMessage System.IntPtr
SetSelectionStyle void

Public Methods

Method Description
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, int position ) : void

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

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.

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.

RichTextBoxEx ( ) : System
SetSelectionLink ( bool link ) : void

Set the current selection's link style

Private Methods

Method Description
GetSelectionStyle ( UInt32 mask, UInt32 effect ) : int
SendMessage ( IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam ) : IntPtr
SetSelectionStyle ( UInt32 mask, UInt32 effect ) : void

Method Details

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 a given position as a link.
public InsertLink ( string text, int position ) : void
text string Text to be inserted
position int Insert position
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

InsertLink() public method

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.
public InsertLink ( string text, string hyperlink, int position ) : void
text string Text to be inserted
hyperlink string Invisible hyperlink string to be inserted
position int Insert position
return void

RichTextBoxEx() public method

public RichTextBoxEx ( ) : System
return System

SetSelectionLink() public method

Set the current selection's link style
public SetSelectionLink ( bool link ) : void
link bool true: set link style, false: clear link style
return void