Tabs and Pages - tabbing between controls (OpenInsight 32-bit Specific)
At 14 OCT 2008 11:08:17AM Ross LW Brooker wrote:
Hi,
I'm experimenting with OI 8.2 for the first time, and I'm keen to use the Tab control. But I've run into a small problem, and couldn't find anything in the Help or these forums to help me, so forgive me if this is a dumb question!
I've created a form with 3 pages.
I've created a Tab control with 3 tabs and made it 'All Pages'.
I've amended the 'Value' parameters for each tab to 1,2 and 3.
I've added the Help's recommended code to the Click event to change the VPOSITION property (and added the other code to the VSCROLL event on the window)
I've created 'Apply','OK' and 'Cancel' buttons and made those 'All Pages'
I've then added some controls to each page.
Now the Tab control works beautifully, the appropriate pages' controls are displayed, it's all great except when I use the tab key to move through the controls.
The problem is I can keep tabbing until I'm off the first page and into the controls of the next page.
The Tab control doesn't change to reflect the fact I'm on page 2, and it also won't tab through my Apply / OK / Cancel buttons either (which isn't unexpected, but would've been nice!).
That's moot though as really, to follow standard Windows UI, it shouldn't go to the next page anyway, but should just set focus back to the control at the top of the first page.
Is there an easy way to modify the behaviour (another check box I need to tick…?) or is there nothing else for it but to add in code on the Lostfocus events to manually override the tab order?
My thanks in advance,
Ross
====
At 14 OCT 2008 11:39AM [email protected]'s Don Bakke wrote:
Ross,
If you want to control the tab order so that you don't move from page to page when the user is tabbing through the form you will want to look at the NEXT and PREV properties.
If you want to trap when the form goes to a new page so that you can update the tab that appears selected then the VSCROLL event should work for you. We also capture the GOTFOCUS event of each control as a redundant trigger.
At 14 OCT 2008 01:02PM Ross LW Brooker wrote:
Thanks Don.
It's a shame that it doesn't automatically detect the last tab order control on the page and cycle back to the top, but at least fiddling with NEXT and PREV (which I'd forgotten about) isn't *too* onerous. (Assuming they work - I seem to recall problems with them In The Olden Days ;))
cheers!
At 14 OCT 2008 01:34PM [email protected]'s Don Bakke wrote:
Ross,
Hmmm…I don't ever recall those properties having problems.
Anyway, my preference would be for an option to design custom tab orders with a form. However, with v9.0, we *should* be able to do that since all controls will now have a property panel. In theory, we should be able to update the NEXT/PREV property at design time and get the navigational effect that we want.