zubie 10-05-2001, 03:31 AM Hey All
I have several SSTabs in my project.
I have tried and never succeeded in getting the tab order correct.
When pressing tab I only want the it to tab around the visable screen without going to the elements in the second/third etc elements in the SSTab
Anyone know how to do this?
(short of having to set the TabStop property for all elements in the other tabs to false .. some of my SSTabs have 15+ elements)
here's hoping
Dave
Banjo 10-05-2001, 05:05 AM Could you post your project because I've never had any problem with this (I too use multiple SSTabs, sometimes embedded within each other).
zubie 10-05-2001, 05:39 AM Ahh sorry can't do that (It's about 7 MB and a work project)
I've attached a word doc with the screen and the property pages.
Laurent 10-05-2001, 06:22 AM you can do this with a keypress, you can control the tab by using the set focus function
I'll be amongst the best any minute now !
Banjo 10-05-2001, 06:24 AM You could, but its a bit like hard work when the tab ordering should do it for you images/icons/smile.gif.
Laurent 10-05-2001, 06:27 AM you don't realy need to control the tab on every control but maybe on only the last control of the tab
I'll be amongst the best any minute now !
Banjo 10-05-2001, 06:34 AM Sorry, I don't follow.
Laurent 10-05-2001, 06:41 AM ok 1st you set the tab index in the order you want it, then you check if it's what you need, if some controls dont react like you would like then you use the keypress event to control it manualy
example:
on the last control of you tab you use the keypress event, check for a tab (keyascii = 9), then set focus on the next tab and the first control in it.
hope i'm clear enough if not i'll write a sample code
I'll be amongst the best any minute now !
Banjo 10-05-2001, 06:45 AM Oh I see what you mean now. However, I think Zubie was saying that it was tabbing through the controls belonging to non-visible tabs (correct me if I'm wrong Zubie).
Laurent 10-05-2001, 06:48 AM if you only use the tab it wont set the focus on the next tab in the sstab, you need to do it a bit like i suggested above
I'll be amongst the best any minute now !
Banjo 10-05-2001, 06:52 AM I think we've both got different interpretations of the question. I think we should wait for Zubie to clarify it.
Laurent 10-05-2001, 06:58 AM i guess he's left already, we'll wait for him then!!!
I'll be amongst the best any minute now !
zubie 10-09-2001, 05:15 AM Hello guys ...
hope ye haven't been waiting for me all this time :o)
net has been down since I posted (and seeing I'm in Ireland I was gone for the weekend when last post went in)
anyway ... hope ye are still around
to clear up the question a wee bit.
What I required was for the tab, once it had tabbed around all the visible tab was to return to the first element in that tab again.
The problem with checking for focus being set on the tab is that this is only one focus event. If the tab order of a control is somewhere in the middle and the next tab in order is in another tab then it jumps there and no up to the tab.
The only way I have found so far to over come this is to encase all element in each tab in a frame and then on the tab click event check which tab is in use and enable/disable frame as needed. This can be really long winded but it works .... maybe I'm just being lazy (or wanting something that was in VB 3 and not vb 6?)
Later
Zubie
Banjo 10-09-2001, 05:24 AM Could you re-write your last post. You appear to using the word tab for 3 different purposes. Re-write it using TabIndex for the TabOrder info, TabStrip for the SSTab and Tab for an individual Tab in the TabStrip.
Hopefully, that would make your problem clearer. Cheers.
zubie 10-09-2001, 05:38 AM OKly DOkly ... :o) (Your right Banjo, even confused me second time around)
What I required was for each Tab, once it had tabbed around all the visible Tab was to return to the first element in that Tab again. Instead it jumps to another component and not the TabStrip.
The problem with checking for focus being set on each Tab in the TabStrip is that this is only one focus event for the entire TabStrip and also it only has one TabIndex. If the TabIndex of a control is somewhere in the middle and the next TabIndex in order is a control in another Tab then it jumps there and not up to the TabStrip.
The only way I have found so far to over come this is to encase all element in each Tab in a frame and then on the Tab click event check which Tab is in use and enable/disable each frame as needed. This can be really long winded but it works ....
just one other little bit of data ... most of my users use the keyboard (some think they should feed cheese to the mice ... :o)), so that is my primary focus for this.
(hope this is a bit clearer)
thanks
Zubie
Banjo 10-09-2001, 05:52 AM Firstly, you need to set the TabIndex values of your controls to be sequential; i.e.: in the order that you want to tab around.
Secondly if you have two tabstrips (?) then you could do as Laurent suggested earlier and explicitly set the tabindex the LostFocus event of the last control on the tabstrip. However, this should only be done if there is a very specific reason for it. If you have two tabstrips enabled and visible at the same time then the user should be able to move around both using the keyboard and not just the mouse.
Basically you should set the tabindex order to allow the user to cycle through all visible and enabled controls in a logical sequence.
If none of this makes sense then perhaps you could post the form to enlighten me.
|