Version

FormattedTextMenuItems Enumeration

Enum for specifying the FormattedLinkEditor.ContextMenuItems property.
Syntax
'Declaration
 
Public Enum FormattedTextMenuItems 
   Inherits System.Enum
public enum FormattedTextMenuItems : System.Enum 
Members
MemberDescription
AllDisplay all menu items. Note that if you specify All, any new menu items that get implemented in the future will also be displayed when you upgrade your application to the newer version.
BoldMenu item for toggling the bold attribute of selected text.
CopyCopy menu item.
CutCut menu item.
DefaultDefault is to display Cut, Copy, Paste, Undo, Redo and SelectAll menu items.
DeleteDelete menu item.
FontDisplay menu item(s) that allow the user to change font of the selected text.
ImageDisplay menu item(s) that allow the user to insert image and change the attributes of existing image.
ItalicsMenu item for toggling the italics attribute of selected text.
LineAlignmentDisplay menu items that allow the user change the line alignment.
LinkDisplay menu item(s) that allow the user to insert links and modify the existing links.
NoneDon't display any context menu.
ParagraphDisplay menu items that allow the user to change paragraph settings.
PastePaste menu item.
RedoRedo menu item.
ReservedReserved. For internal use only.
SelectAllSelect All menu item.
SpellingSuggestionsThis will display list of suggested words in the context meny when it's displayed over a misspelled word. Note that in order for this option to have any effect, a spell-checker must be assigned to the editor control or the column.
StrikeoutMenu item for toggling the strikeout attribute of selected text.
SubscriptMenu item for toggling the subscript attribute of selected text.
SuperscriptMenu item for toggling the superscript attribute of selected text.
UnderlineMenu item for toggling the underline attribute of selected text.
UndoUndo menu item.
Example
The following code shows some of the properties and methods used for edit operations.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.Misc
Imports Infragistics.Win.FormattedLinkLabel

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
        ' By default the right-click context menu displays a subset of options supported
        ' by the formatted text editor. You can control which options get displayed in
        ' the context menu using the ContextMenuItems property.
        Me.ultraFormattedTextEditor1.ContextMenuItems = FormattedTextMenuItems.All

        ' You may want to prevent the control from hiding selection whenever it looses
        ' focus. Set HideSelection to false for that.
        Me.ultraFormattedTextEditor1.HideSelection = False

        ' PerformAction can be used to perform keyboard actions. This would be useful
        ' for example if you had toolbar buttons for performing certain operations that
        ' are also supported by the built-in key actions.
        Me.ultraFormattedTextEditor1.PerformAction(FormattedLinkEditorAction.ToggleBold, False, False)

        ' EditInfo property returns an object that can be used to perform various edit
        ' related operations.
        Dim editInfo As FormattedTextEditInfo = Me.ultraFormattedTextEditor1.EditInfo

        ' Set the editor's value to some formatted text for testing purposes.
        Me.ultraFormattedTextEditor1.Value = "Test <b>Value</b>."

        ' Select some contents.
        editInfo.SelectionStart = 5
        editInfo.SelectionLength = 5

        ' Make the selected contents into a link.
        editInfo.MakeSelectionIntoLink("<a href=""http:://es.infragistics.com""></a>")

        ' Apply some style on the selected content. Please consult help for a listing of
        ' supported style attributes.
        editInfo.ApplyStyle("font-size: +8pt; font-family: Courier New; background-color: Yellow", False)

        ' Use the Value property to get the new formatted text from the editor. Since
        ' Value property is object type, simply call ToString to convert it to a string.
        Dim newFormattedText As String = Me.ultraFormattedTextEditor1.Value.ToString()

        ' Print out the new value.
        Debug.WriteLine("New formatted text = " & newFormattedText)
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.Misc;
using Infragistics.Win.FormattedLinkLabel;
using System.Diagnostics;


		private void button1_Click(object sender, System.EventArgs e)
		{
			// By default the right-click context menu displays a subset of options supported
			// by the formatted text editor. You can control which options get displayed in
			// the context menu using the ContextMenuItems property.
			this.ultraFormattedTextEditor1.ContextMenuItems = FormattedTextMenuItems.All;

			// You may want to prevent the control from hiding selection whenever it looses
			// focus. Set HideSelection to false for that.
			this.ultraFormattedTextEditor1.HideSelection = false;

			// PerformAction can be used to perform keyboard actions. This would be useful
			// for example if you had toolbar buttons for performing certain operations that
			// are also supported by the built-in key actions.
			this.ultraFormattedTextEditor1.PerformAction( FormattedLinkEditorAction.ToggleBold, false, false );

			// EditInfo property returns an object that can be used to perform various edit
			// related operations.
			FormattedTextEditInfo editInfo = this.ultraFormattedTextEditor1.EditInfo;

			// Set the editor's value to some formatted text for testing purposes.
			this.ultraFormattedTextEditor1.Value = "Test <b>Value</b>.";

			// Select some contents.
			editInfo.SelectionStart = 5;
			editInfo.SelectionLength = 5;
			
			// Make the selected contents into a link.
			editInfo.MakeSelectionIntoLink( @"<a href=""http://es.infragistics.com""></a>" );

			// Apply some style on the selected content. Please consult help for a listing of
			// supported style attributes.
			editInfo.ApplyStyle( "font-size: +8pt; font-family: Courier New; background-color: Yellow", false );

			// Use the Value property to get the new formatted text from the editor. Since
			// Value property is object type, simply call ToString to convert it to a string.
			string newFormattedText = this.ultraFormattedTextEditor1.Value.ToString( );

			// Print out the new value.
			Debug.WriteLine( "New formatted text = " + newFormattedText );
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also