none
How to define scrollbars in a ToolStripButton in VB .NET? RRS feed

  • Question

  • Hi all of you,

    Primary platform is Framework 2.0

    I've got a toolstripbutton with 12 elements (icons) but the last one is not visible at all, I was wondering how to activate scrollbars but I don't find the place.

    TIA,


    Enric

    Wednesday, August 1, 2012 1:45 PM

Answers

  • Although the ToolStrip inherits from ScrollableControl it does not support it. One way is to set CanOverflow property to true when not visible items are send to overflow menu. You can use alternative trick to add the ToolStrip to Panel that does support scrolling. So add Panel for example to top of the form and set AutoScroll to true, then add ToolStrip inside that panel without docking and set whatever layout mode you like.

    I think you can find sample of this from Windows Forms forums at least I remember that's the place where I pick up this trick.

    • Edited by MasaSam Wednesday, August 1, 2012 6:32 PM
    • Marked as answer by Enric Vives Thursday, August 2, 2012 6:10 AM
    Wednesday, August 1, 2012 6:30 PM

All replies

  • Although the ToolStrip inherits from ScrollableControl it does not support it. One way is to set CanOverflow property to true when not visible items are send to overflow menu. You can use alternative trick to add the ToolStrip to Panel that does support scrolling. So add Panel for example to top of the form and set AutoScroll to true, then add ToolStrip inside that panel without docking and set whatever layout mode you like.

    I think you can find sample of this from Windows Forms forums at least I remember that's the place where I pick up this trick.

    • Edited by MasaSam Wednesday, August 1, 2012 6:32 PM
    • Marked as answer by Enric Vives Thursday, August 2, 2012 6:10 AM
    Wednesday, August 1, 2012 6:30 PM
  • thanks a lot

    Enric

    Thursday, August 2, 2012 6:10 AM