|
Problems with SSTab Control (TabOrder, Changing Tabs, Hotkeys)
Author |
Message |
Benno Scher #1 / 5
|
 Problems with SSTab Control (TabOrder, Changing Tabs, Hotkeys)
Hello all! I got some problems with a SSTab control (VB 6): Assume there are two tabs: "Tab1" and "Tab2", the tab order of the control elements is from top to bottom, left to right and "Tab1" to "Tab2". Tab1 Tab2 -------- -------- 1 3 5 7 2 4 6 8 1. When tab "Tab1" is visible the focus disappears after pressing the TAB-Key and having the focus on the last control element of tab "Tab1" (4). The focus goes to tab "Tab2" but does not keep to the tab order of the control elements (goes to 7 instead of 5 - it's really true!). 2. CTRL + TAB does not change the visible tab from "Tab1" to "Tab2". 3. If tab "Tab1" is visible a hotkey an tab "Tab2" is still active. 4. The KeyPress event of the form (KeyPreview is TRUE) does not catch the TAB-Key. Does anybody know the trick to get a workable SSTab control? Thank you very much Benno Scherer
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
Brad Pane #2 / 5
|
 Problems with SSTab Control (TabOrder, Changing Tabs, Hotkeys)
Although not an expert on the Tab control I have used it and think that it works nicely.
Quote: > Hello all! > I got some problems with a SSTab control (VB 6): > Assume there are two tabs: "Tab1" and "Tab2", the tab order of the > control elements is from top to bottom, left to right and "Tab1" to > "Tab2". > Tab1 Tab2 > -------- -------- > 1 3 5 7 > 2 4 6 8 > 1. When tab "Tab1" is visible the focus disappears after pressing the > TAB-Key and having the focus on the last control element of tab "Tab1" > (4). The focus goes to tab "Tab2" but does not keep to the tab order > of the control elements (goes to 7 instead of 5 - it's really true!).
I think that it is up to you to set the focus where you want it here... Quote: > 2. CTRL + TAB does not change the visible tab from "Tab1" to "Tab2".
You have to put code in Keypress event for the form here... Quote: > 3. If tab "Tab1" is visible a hotkey an tab "Tab2" is still active.
All hot keys are active unless you disable them...for example menu hot keys...even if I change to View... Quote: > 4. The KeyPress event of the form (KeyPreview is TRUE) does not catch > the TAB-Key. > Does anybody know the trick to get a workable SSTab control? > Thank you very much > Benno Scherer
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
Brad Pane #3 / 5
|
 Problems with SSTab Control (TabOrder, Changing Tabs, Hotkeys)
Finishing my reply...accidentally sent this out...before I was done
Quote: > Hello all! > I got some problems with a SSTab control (VB 6): > Assume there are two tabs: "Tab1" and "Tab2", the tab order of the > control elements is from top to bottom, left to right and "Tab1" to > "Tab2". > Tab1 Tab2 > -------- -------- > 1 3 5 7 > 2 4 6 8 > 1. When tab "Tab1" is visible the focus disappears after pressing the > TAB-Key and having the focus on the last control element of tab "Tab1" > (4). The focus goes to tab "Tab2" but does not keep to the tab order > of the control elements (goes to 7 instead of 5 - it's really true!).
I think its up to you to set focus here... Quote: > 2. CTRL + TAB does not change the visible tab from "Tab1" to "Tab2".
I think you need to add code in Keypress event, I dont think the control supports Ctrl-Tab Quote: > 3. If tab "Tab1" is visible a hotkey an tab "Tab2" is still active.
All hot-keys are active unless you disable them... Alt-F-O still works in Visual C even when form is set to View-Full Screen. Quote: > 4. The KeyPress event of the form (KeyPreview is TRUE) does not catch > the TAB-Key.
Doesn't sound like an SStab problem. Quote: > Does anybody know the trick to get a workable SSTab control?
Create your own, or add the code you think it needs for it to work the way you want it to. AFAIC as long as when you Click on the top tab, and that folder comes to the front...works OK for me Quote: > Thank you very much > Benno Scherer
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
Ja #4 / 5
|
 Problems with SSTab Control (TabOrder, Changing Tabs, Hotkeys)
Comments inline.
were released on Wed, 06 Dec 2000 23:44:28 GMT bearing the following fruit: Quote: >Hello all! >I got some problems with a SSTab control (VB 6): >Assume there are two tabs: "Tab1" and "Tab2", the tab order of the >control elements is from top to bottom, left to right and "Tab1" to >"Tab2". >Tab1 Tab2 >-------- -------- >1 3 5 7 >2 4 6 8 >1. When tab "Tab1" is visible the focus disappears after pressing the >TAB-Key and having the focus on the last control element of tab "Tab1" >(4). The focus goes to tab "Tab2" but does not keep to the tab order >of the control elements (goes to 7 instead of 5 - it's really true!).
Hmm! The trick is to disable any controls that are not visible. This is most easily done by having a frame on each tab and putting your controls in that. Then you only need to disable the frame. Quote: >2. CTRL + TAB does not change the visible tab from "Tab1" to "Tab2".
If by visible you mean active then it does work for me. (And I didn;t even know about CTRL + TAB until I read your post) Quote: >3. If tab "Tab1" is visible a hotkey an tab "Tab2" is still active.
See 1 Quote: >4. The KeyPress event of the form (KeyPreview is TRUE) does not catch >the TAB-Key.
Nothing to do with the SSTab though. Quote: >Does anybody know the trick to get a workable SSTab control?
The SSTab does work, it just doesn't work the way _you_ expect it too. Like most controls, there is usually a little extra coding involved to get it to work how you would like it to. J
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
Benno Scher #5 / 5
|
 Problems with SSTab Control (TabOrder, Changing Tabs, Hotkeys)
Thanks for your reply! Comments see below.
Quote: >Finishing my reply...accidentally sent this out...before I was done
>> Hello all! >> I got some problems with a SSTab control (VB 6): >> Assume there are two tabs: "Tab1" and "Tab2", the tab order of the >> control elements is from top to bottom, left to right and "Tab1" to >> "Tab2". >> Tab1 Tab2 >> -------- -------- >> 1 3 5 7 >> 2 4 6 8 >> 1. When tab "Tab1" is visible the focus disappears after pressing the >> TAB-Key and having the focus on the last control element of tab "Tab1" >> (4). The focus goes to tab "Tab2" but does not keep to the tab order >> of the control elements (goes to 7 instead of 5 - it's really true!). >I think its up to you to set focus here...
You are right! I did it with the LostFocus event instead of the GotFocus event but I still think there is an error in VB. My solution works fine but I have to check it after each change on the SSTab control. Quote: >> 2. CTRL + TAB does not change the visible tab from "Tab1" to "Tab2". >I think you need to add code in Keypress event, I dont think the control >supports Ctrl-Tab
After allowing the focus to position on the SSTab control the key combination works (arrow keys also work). But: The focus has to be on the SSTab control for changing the tab with keystrokes. Quote: >> 3. If tab "Tab1" is visible a hotkey an tab "Tab2" is still active. >All hot-keys are active unless you disable them... Alt-F-O still works in >Visual C even when form is set to View-Full Screen.
No good solution found until now. There is a very expensive one. Check in the GotFocus event of each control what tab is the visible one. If the control does not belong to the visible tab, the hotkey event should be canceled. No, I refuse to do something like that. Quote: >> 4. The KeyPress event of the form (KeyPreview is TRUE) does not catch >> the TAB-Key. >Doesn't sound like an SStab problem.
You are right and I don't need the KeyPress event for my solution. But in the VB 6 documentation the TAB-Key is explicitly mentioned as one of the keys the KeyPress event is able to catch. Quote: >> Does anybody know the trick to get a workable SSTab control? >Create your own, or add the code you think it needs for it to work the way >you want it to. >AFAIC as long as when you Click on the top tab, and that folder comes to the >front...works OK for me
"Create your own" would be the best solution, but how can I do that. Any literature you can recommend? Quote: >> Thank you very much >> Benno Scherer
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
|
|