Show Changes Show Changes
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename


6/9/2011 11:03:34 AM
8/21/2006 10:40:50 AM
7/25/2006 4:27:23 PM
3/16/2006 7:31:49 PM
2/11/2006 2:56:50 AM
List all versions List all versions

Toolbar Configuration
Summary How to configure various ToolbarButtons and ToolbarDropDownLists in FreeTextBox

Toolbar configuration

There are three ways to configure the FreeTextBox toolbar area

1. ToolbarLayout String

This property accepts a string of ToolbarItem names. Use commas (,) to separate items. A pipe (|) will insert a separator and a semicolon ( will start a new Toolbar.

The default way to configure toolbars is to use use the propery ToolbarLayout

   <form runat="server">
     <FTB:FreeTextBox id="FreeTextBox1"
       runat="Server" />

Valid values for ToolbarButtons and ToolbarDropDownLists are

 ParagraphMenu, FontFacesMenu, FontSizesMenu, FontForeColorsMenu, FontForeColorPicker, FontBackColorsMenu, FontBackColorPicker, Bold, Italic, Underline, Strikethrough, Superscript, Subscript, InsertImageFromGallery, CreateLink, Unlink, RemoveFormat, JustifyLeft, JustifyRight, JustifyCenter, JustifyFull, BulletedList, NumberedList, Indent, Outdent, Cut, Copy, Paste, Delete, Undo, Redo, Print, Save, ieSpellCheck, StyleMenu, SymbolsMenu, InsertHtmlMenu, InsertRule, InsertDate, InsertTime, WordCount 

A pipe (|) will insert a ToolbarSeparator and a semicolon ( will start a new Toolbar.

2. Procedurally

You can define which toolbar items appear by adding ToolbarItems in much the same way that one would add DataGrid Columns to a DataGrid. In order to do this, set AutoGenerateToolbarLayoutFromString=false:

    <form runat="server">
        <FTB:FreeTextBox id="FreeTextBox1" AutoGenerateToolbarsFromString="false" runat="server" >
                <FTB:Toolbar runat="server">
                    <FTB:ParagraphMenu runat="server" />
                    <FTB:FontSizesMenu runat="server" />
                <FTB:Toolbar runat="server">
                    <FTB:Bold runat="server" />
                    <FTB:Italic runat="server" />
                    <FTB:Underline runat="server" />
                    <FTB:ToolbarSeparator runat="server" />
                    <FTB:BulletedList runat="server" />
                    <FTB:NumberedList runat="server" />
                <FTB:Toolbar runat="server">
                    <FTB:InsertHtmlMenu runat="server">
                            <FTB:ToolbarListItem Text="Cool1" Value="<b>lalala</b>" runat="server" />
                            <FTB:ToolbarListItem Text="Cool2" Value="<i>lalala</i>" runat="server" />
                            <FTB:ToolbarListItem Text="Cool3" Value="<u>lalala</u>" runat="server" />
                    <FTB:StyleMenu runat="server">
                            <FTB:ToolbarListItem Text="Highlighed" Value="<b>Highlighed</b>" runat="server" />
                            <FTB:ToolbarListItem Text="SmallCaps" Value="<i>smallcaps</i>" runat="server" />

3. Code (Page_Load or Code Behind)

ToolbarButtons and ToolbarDropDownLists can also be set through code. You should set the property AutoGenerateToolbarsFromString to false if you want only the ToolbarItems you define.

 <script runat="server">
 void Page_Load(object Src, EventArgs E) {
    Toolbar toolbar1 = new Toolbar();
    toolbar1.Items.Add(new ParagraphMenu());
    toolbar1.Items.Add(new FontSizesMenu());


    Toolbar toolbar2 = new Toolbar();
    toolbar2.Items.Add(new Bold());
    toolbar2.Items.Add(new Italic());
    toolbar2.Items.Add(new Underline());
    toolbar2.Items.Add(new ToolbarSeparator());
    toolbar2.Items.Add(new BulletedList());
    toolbar2.Items.Add(new NumberedList());


    Toolbar toolbar3 = new Toolbar();
    StyleMenu styleMenu = new StyleMenu();
    styleMenu.Items.Add(new ToolbarListItem("Highlight","Highlight"));
    styleMenu.Items.Add(new ToolbarListItem("SmallCaps","smallcaps"));


    <form runat="server">
        <FTB:FreeTextBox id="FreeTextBox1" AutoGenerateToolbarsFromString="false" runat="server" />
Welcome to FreeTextBoxWiki

If you're new to FreeTextBox, read the Installation.