Built-in Context Menus and Icon-sets

TX Text Control X9 includes ready-to-use contextual menus. These dynamic menus are available by default and usable without any additional programming.

You can use the context menu to insert headers and footers or to adjust the page layout or borders:

TX Text Control X9 in Visual Studio

The following screenshot shows a context menu that is shown when no text is selected:

TX Text Control X9 in Visual Studio

When the input position is inside a table, the following context menu options are available:

TX Text Control X9 in Visual Studio

The context menus can be fully customized using the new TextContextMenuOpening event. This event can be used to alter or to expand the predefined menu, to provide a custom designed menu or to completely suppress the menu.

TX Text Control X9 in Visual Studio

The event returns a native ContextMenuStrip that can be manipulated. Items can be removed or added and menu item icons can be replaced.

You can easily change the context menu and add an additional item. The following code shows how to add an item to insert a merge field at the current input position:

private void textControl1_TextContextMenuOpening(object sender,
    TXTextControl.TextContextMenuEventArgs e)
{
    ContextMenuStrip menu = e.TextContextMenu;
    ToolStripItem item = new ToolStripMenuItem("Insert Field");
    item.Click += item_Click;

    menu.Items.Add(item);
}

void item_Click(object sender, EventArgs e)
{
    textControl1.TextFields.Add(new TXTextControl.TextField("Test"));
}

In order to provide these ready-to-use context menus, TX Text Control .NET for Windows Forms X9 ships with more than 400 large and small icons that can be used in your applications.

Icon sets for TX Text Control X9Icon sets for TX Text Control X9