I want to be able to enable/disable toolbar buttons from within the ContentsChanged event of myWindow (subclass of Window) but to do that, my understanding is that I must instantiate the toolbar in code rather than drag it into the layout (since myWindow doesn't have a layout editor).
I can't seem to figure this out so I started with an empty project and Window1 to test it but I'm still stuck.
Here are the steps (starting with an empty Xojo Desktop project):
- Add a Toolbar to the project... "Toolbar1"
- Add a ToolButton to Toolbar1... "ToolItem1"
- Add a property to Window1...
myToolbar As Toolbar1
- Instantiate the toolbar in the Open event handler of Window1...
myToolbar = New Toolbar1
Run the program... no Toolbar.. why?