Just create all of the ToolStripButtons
, and set each one's Visible
property to false
. When the user picks them to be shown, change the Visible
property of the ToolStripButton
to true
. They'll automatically appear on the ToolStrip
.
I tested using VS2010 with Oxygene from RemObjects (formerly AKA Delphi Prism
).
- Start a new WinForms application
- Drop a
ToolStrip
on the window. Right-click it and choose Insert standard items
.
- Double-click the
New
button (newToolStripButton
, the one on the left end), and add the following code to the newToolStripButton_Click
handler:
// Oxygene version: helpToolStripButton.Visible := not helpToolStripButton.Visible;
helpToolStripButton.Visible != helpToolStripButton.Visible;
- Run the application, and click the
newTooStripButton
repeatedly, and watch the right-most ToolStripButton
(the Help
button) appear and disappear from the ToolStrip
.