Results 1 to 7 of 7

Thread: [2005] Movable ToolStrip

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    250

    [2005] Movable ToolStrip

    Hi All,

    How do you allow items in a toolstrip to be movable? For example, the toolstrips in MS Word 2003.

    Is it possible to allow items within a toolstrip to be moved around at run time?

  2. #2
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: [2005] Movable ToolStrip

    You can do it by changing the ToolStrip's AllowItemReorder to True. Each item within the control can then by dragged, at runtime, while the Alt key is held down.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] Movable ToolStrip

    Select the ToolStrip, click the little arrow on its top-right corner and select "Enbed in ToolStripContainer. You can now drag the TooStrip to any edge of the form. Floating tool bars are not supported as standard. You would have to write a fair amount of custom code or else get a third-party component for that.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: [2005] Movable ToolStrip

    I'm not sure exactly, jmcilhinney, but I think that Giraffe Frenzy just wants to move the items within the ToolStrip as opposed to moving the ToolStrip within the ToolStripContainer.

    PS: Do you know of any third party ToolStrips that can float or any code to do so?
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] Movable ToolStrip

    Quote Originally Posted by dom_stapleton
    I'm not sure exactly, jmcilhinney, but I think that Giraffe Frenzy just wants to move the items within the ToolStrip as opposed to moving the ToolStrip within the ToolStripContainer.

    PS: Do you know of any third party ToolStrips that can float or any code to do so?
    You may be right about that. Given that you can't just move tool bar items at will I didn't think of that, but the Customize feature is not supported as standard by the ToolStrip component. I'm sure there are plenty fo third-party components that do, although they are probably expensive.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    250

    Re: [2005] Movable ToolStrip

    dom is correct,

    I would like to be able to move the items within the toolbar. I was hoping there was a built in feature to do so.

  7. #7
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: [2005] Movable ToolStrip

    Creating your own Customise dialog is relatively easy to do, but using the AllowItemReorder property is the simplest way.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width