Open and Close RadToolStripItem

Thread is closed for posting
2 posts, 0 answers
  1. Lorenzo
    Lorenzo avatar
    17 posts
    Member since:
    Aug 2007

    Posted 29 Aug 2007 Link to this post

    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();

    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;
        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.
  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 29 Aug 2007 Link to this post

    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.

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top