ToolStrip Docking

2 posts, 0 answers
  1. Don Podluzne
    Don Podluzne avatar
    2 posts
    Member since:
    Feb 2010

    Posted 11 May 2010 Link to this post

    Here is the scenario.  I want to use a tool strip to have 10 Image buttons on one tab strip Item.  I want this tab strip item to be as big as the parent container that holds it and to dynamically grow if the form gets bigger.   Basically docking the tool strip item to both the top left and right.  The tool strip does this,  but the toolstrip item is only as big as the 10 buttons that are put in it.   Is this possible using the Tool strip. 

    Thanks,

    Don
  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 17 May 2010 Link to this post

    Hello Don Podluzne,

    Thank you for writing.

    RadToolStrip does not support the described functionality out of the box. However, you could implement it through the SizeChanged event in your own. Please, consider the following code:
     
    public Form1()
    {
        InitializeComponent();
        this.radToolStripItem1.AutoSize = false;
        this.radToolStrip1.SizeChanged += new EventHandler(radToolStrip1_SizeChanged);
    }
    void radToolStrip1_SizeChanged(object sender, EventArgs e)
    {
        this.radToolStripItem1.Size = new Size(radToolStripElement1.Size.Width - 300, this.radToolStripItem1.Size.Height); 
    }

    Hope this helps. Let me know if you have any other questions.

    Best wishes,
    Martin Vasilev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top