Posted 18 years ago
by Anthony Martin
Version: 2.0.73
Platform: .NET 2.0
Environment: Windows XP (32-bit)
Unfortunately, I'm not able to send you a zip of the project but here's what I do.
1. Create a new windows application project
2. Create a new user control with a bar manager and set it and dock areas to protected
3. Add a new dockable toolbar
4. Build (so that VS recognizes the class)
4. Subclass off the user control
5. Create new commands
6. Drag and drop the commands onto the original tool bar (they will appear within the tool bar).
7. Add the second user control onto Form1.
8. Build and run.
9. The commands won't appear in the new tool bar.
The reason this is happening is that the source code never gets generated within InitializeComponent even though it appears it is in the designer. If you try to add anything to the bar manager from the subclassed component, code is not automatically generated.
1. Create a new windows application project
2. Create a new user control with a bar manager and set it and dock areas to protected
3. Add a new dockable toolbar
4. Build (so that VS recognizes the class)
4. Subclass off the user control
5. Create new commands
6. Drag and drop the commands onto the original tool bar (they will appear within the tool bar).
7. Add the second user control onto Form1.
8. Build and run.
9. The commands won't appear in the new tool bar.
The reason this is happening is that the source code never gets generated within InitializeComponent even though it appears it is in the designer. If you try to add anything to the bar manager from the subclassed component, code is not automatically generated.