FreeTextBox

The no. 1 free ASP.NET HTML Editor.
Welcome to FreeTextBox Sign in | Join | Help
in Search

Can I hide the buttons on a free textbox?

Last post 01-04-2010, 5:27 AM by Ludek Janicek. 3 replies.
Sort Posts: Previous Next
  •  06-18-2007, 6:49 PM 8323

    Can I hide the buttons on a free textbox?

    (1)  Can I hide all buttons and use just the text area on a free textbox?  If so, how?

    (2)  Can I hide some buttons?  If so, how?

    Thanks.

    DanYeung

  •  08-09-2007, 4:00 AM 8453 in reply to 8323

    Re: Can I hide the buttons on a free textbox?

    I'm intereted to know the answer to this too. DanYeung did you manage to find out?
  •  09-18-2007, 4:02 PM 8547 in reply to 8323

    Re: Can I hide the buttons on a free textbox?

    Yes you can do this.

    You can remove tollbars or each individual items in the tool bar. the code below removes print button from toolbar

    FreeTextBoxControls.Support.ToolbarCollection coll = this.FreeTextBox1.Toolbars;

    for (int i = 0; i < coll.Count; i++)

    {

    FreeTextBoxControls.Support.ToolbarItemCollection itcol = coll[i].Items;

    for (int items = 0; items < itcol.Count; items++)

    {

    //each indivudal item has unique title

    if (itcol[items].Title.Equals("Print"))

    {

    itcol.Remove(itcol[items]);

    or

    FreeTextBoxControls.Print it = (FreeTextBoxControls.Support.Print)itcol[items];

    itcol.Remove(it);

    }

    }

    }

  •  01-04-2010, 5:27 AM 10273 in reply to 8547

    Re: Can I hide the buttons on a free textbox?

    Remove items from toolbar in FreeTextBoxCnv

    Your code contains a mistake:-). You must using decrement
    items-- when you remove items from toolbar.


    this is my code:

               
    ToolbarCollection coll = tbEmailBody.Toolbars;
               
    for (int i = 0; i < coll.Count; i++)
                {
                   
    ToolbarItemCollection itcol = coll[i].Items;
                   
                   
    for (int items = 0; items < itcol.Count; items++)
                    {
                        
    if (itcol[items].Title.Equals("Paragraph Style") || itcol[items].Title.Equals("Text Style"))
                        {
                            itcol.Remove(itcol[items]);
                            items--;
                        }
                    }
       
            }
View as RSS news feed in XML
www.freetextbox.com