This is a migrated thread and some comments may be shown as answers.

Open and Close RadToolStripItem

1 Answer 86 Views
Toolstrip (obsolete as of Q3 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lorenzo
Top achievements
Rank 1
Lorenzo asked on 29 Aug 2007, 07:44 AM
Hi,
I have to develop an IDE with some toolbars. I want create also a menu "View" where i can open and close the different toolbars.

I have put in the form one radToolStrip that contains two radToolStripElement. Each radToolStripElement contains some radToolStripItem.

In the contructor of the form i have inserted the following statements:

    RadToolStripDockSite dockSite = new RadToolStripDockSite();
    InitializeComponent();
    dockSite.AddToolStrip(this.radToolStrip1);

and i set the following properties of the radToolStrip using designer

    allowDragging = true
    allowFloating = true

Now i want implement the code to toggle visibility of each radToolStripItem.
I tried with the following code to toggle visibility:

if (radToolStripItem1.Visibility !=  ElementVisibility.Visible)
    radToolStripItem1.Visibility = ElementVisibility.Visible;
else
    radToolStripItem1.Visibility = ElementVisibility.Hidden;

but doesn't work. I also tried to use ElementVisibility.Collapsed but doesn't work.
I have two problems:
1. When I drag one radToolStripItem in floating mode the code can't close the radToolStripItem. If i drag back the item in not floating mode the code doesn't work again
2. When I close one radToolStripItem and one radToolStripElement has no more visible item, the radToolStripElement remains visible.

What is the best way to solve my problems?

Thanks for support.
Lorenzo

1 Answer, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 29 Aug 2007, 05:02 PM
Hello Lorenzo,

Thank you very much for your feedback. We will greatly appreciate it if you continue to share the issues which you stumble upon when working with our controls.

Could you please open a new support ticket and send me a very simple application demonstrating the described behavior, so I am able to provide you an exact solution? The problem you experience is most probably related to the logic of RadToolStrip and the solution won't be very simple.

By default RadToolStrip uses its built-in functionality to hide the toolStrip items using their drop down menu, which is activated by clicking on the overFlow button of a particular tool strip item. Then it opens the customization form which gives access to the checkboxes whose only purpose is to change the visibility state of the tool strip item. 

I'm looking forward to your reply.
 

Greetings,
Ray
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Toolstrip (obsolete as of Q3 2010)
Asked by
Lorenzo
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Share this question
or