This again is going to be more of a memory for me, but it will still be useful for those of you working with the OpenInsight (OI) 10 Alpha. I’m a back to working on an application for one of our Value Added Resellers (VAR) and I’ve been trying to build a dynamic toolbar because the system is mostly operated by touch screen operators.
The current menu is three levels deep and the toolbar is limited in space. I therefore wanted to have a double toolbar with one row of static buttons and a row below which would change depending on which top level button (menu item) is clicked. The obvious way to achieve this is a panel with a row of buttons and a tab control.
Now the Tab Control in OI 10 is located under the Containers sub category in the Toolbox. I therefore thought “Great, I’ll drop the buttons on the tab and all will be good.” However, the current Tab Control has been specifically designed to operate like the current OI9 Tab Control. This uses paging Forms and you simply drop the controls on the appropriate page, rather than the tab control. Dropping them onto the Tab Control is actually impossible because it jumps to page one all of the time. Nevertheless, thinking that the tab control was an intelligent container, I blindly pressed on, getting myself into a state of confusion.
Five minutes later and Carl put me right. He explained that the current Tab Control has been written to work exactly like the current one so that people’s upgraded applications will not break – that’s the Wisdom and I really glad that Revelation are thinking about supporting existing application, rather than blindly building new controls for new applications.
All I needed to do was:
- Drop the tab control on my form and make it shallow so that only the buttons show.
- Drop the buttons (or whatever controls) onto the appropriate pages and where I need them to show on the tab control.
- Then the bit I was missing. The buttons will most likely display under the tab control. So, click on the button, right mouse click and choose ‘Bring to Front’.
- Finally, slide the Tab Control over the buttons to contain them – or give the appearance to contain them.
- Add the usual tab control code used in OI9 and you are done.
So, what about a brand new tab control that works as a container and that has pagination, or whatever? Well, don’t hold your breath, but watch this space.
A few minutes later and I have my working dynamic toolbar. Now I just need to add some glyph images, some code to launch the associated forms and I’m done :D.