Confusion & Wisdom


oi10tab1
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:

  1. Drop the tab control on my form and make it shallow so that only the buttons show.
  2. Drop the buttons (or whatever controls) onto the appropriate pages and where I need them to show on the tab control.
  3. 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’.
  4. Finally, slide the Tab Control over the buttons to contain them – or give the appearance to contain them.
  5. 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.

 

Advertisements

2 thoughts on “Confusion & Wisdom

  1. Just a quick update since we talked – new controls added to the form are now moved to the top of the z-order when you drop them, so that’s one less step (By default windows adds them to the bottom… sure there’s a good reason for this 😉 )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s