What is wrong with SSTab control? 
Author Message
 What is wrong with SSTab control?

I use SSTab control with 10 pages to present information
conditionally, each page having several textboxes or
comboboxes.

On Page 1 I use a array of CheckBoxes to decide which page
to go and in Checkbox_Lostfocus event supposedly I set
SSTab1.Tab = 2 and text2.setfocus as first control to get
focus on that page for one of CheckBoxes. When
Checkbox_Lostfocus event triggers, another page gets focus
instead of page 3. If I don't set focus for the first
control on that page, Page 3 gets focus and works. How to
get what I wnat? Thanks!



Tue, 16 Nov 2004 05:40:54 GMT  
 What is wrong with SSTab control?
There's really not much wrong with the SSTab control.. it does pretty much
everything you ask it to (if polite <g>)... post the code you're using
'cause I can't figure out your description.

The scary part of your post...

Quote:
> Checkbox_Lostfocus event supposedly

supposedly ? Have you placed breakpoints or Debug.Prints there?

--
Ken Halter
MS-MVP-VB
http://www.vbsight.com
Please keep it in the groups..

Quote:

> I use SSTab control with 10 pages to present information
> conditionally, each page having several textboxes or
> comboboxes.

> On Page 1 I use a array of CheckBoxes to decide which page
> to go and in Checkbox_Lostfocus event supposedly I set
> SSTab1.Tab = 2 and text2.setfocus as first control to get
> focus on that page for one of CheckBoxes. When
> Checkbox_Lostfocus event triggers, another page gets focus
> instead of page 3. If I don't set focus for the first
> control on that page, Page 3 gets focus and works. How to
> get what I wnat? Thanks!



Tue, 16 Nov 2004 06:10:26 GMT  
 What is wrong with SSTab control?
Hi,

Thank you for your help. First, you use default SSTab
control. On page 0, draw 1 ComboBox array with two combo1,
Page 1 with two TextBox (Text1, Text2) and Page 2 two
TextBox(Text3, Text4). I want to Page 1 will get focus
after Comb1 with index 0 lost focus. But by now the page
goes to Page 2.  The code is as follow:

Private Sub Combo1_LostFocus(Index As Integer)

If Index = 0 Then
   SSTab1.Tab = 1
ElseIf Index = 1 Then
   SSTab1.Tab = 2
End If
End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)

If SSTab1.Tab = 1 Then
   Text1.SetFocus
ElseIf SSTab1.Tab = 2 Then
   Text3.SetFocus
End If
End Sub

Quote:
>-----Original Message-----
>There's really not much wrong with the SSTab control.. it
does pretty much
>everything you ask it to (if polite <g>)... post the code
you're using
>'cause I can't figure out your description.

>The scary part of your post...
>> Checkbox_Lostfocus event supposedly

>supposedly ? Have you placed breakpoints or Debug.Prints
there?

>--
>Ken Halter
>MS-MVP-VB
>http://www.vbsight.com
>Please keep it in the groups..


>> I use SSTab control with 10 pages to present information
>> conditionally, each page having several textboxes or
>> comboboxes.

>> On Page 1 I use a array of CheckBoxes to decide which
page
>> to go and in Checkbox_Lostfocus event supposedly I set
>> SSTab1.Tab = 2 and text2.setfocus as first control to
get
>> focus on that page for one of CheckBoxes. When
>> Checkbox_Lostfocus event triggers, another page gets
focus
>> instead of page 3. If I don't set focus for the first
>> control on that page, Page 3 gets focus and works. How
to
>> get what I wnat? Thanks!

>.



Tue, 16 Nov 2004 10:38:24 GMT  
 What is wrong with SSTab control?
here is your solution.
i give u code here just paste it.
i keep all controls as u take in previous program

Private Sub Combo1_Click(Index As Integer)
If Combo1(0).Index = 0 Then
   SSTab1.Tab = 1
ElseIf Combo1(0).Index = 1 Then
   SSTab1.Tab = 2
End If
End Sub

Private Sub Form_Load()
Combo1(0).AddItem "apple"
Combo1(0).AddItem "orange"

Combo1(1).AddItem "pizza"
Combo1(1).AddItem "Hot dog"

End Sub

if still u have any problem contect me
cheer up

Quote:
> Hi,

> Thank you for your help. First, you use default SSTab
> control. On page 0, draw 1 ComboBox array with two combo1,
> Page 1 with two TextBox (Text1, Text2) and Page 2 two
> TextBox(Text3, Text4). I want to Page 1 will get focus
> after Comb1 with index 0 lost focus. But by now the page
> goes to Page 2.  The code is as follow:

> Private Sub Combo1_LostFocus(Index As Integer)

> If Index = 0 Then
>    SSTab1.Tab = 1
> ElseIf Index = 1 Then
>    SSTab1.Tab = 2
> End If
> End Sub

> Private Sub SSTab1_Click(PreviousTab As Integer)

> If SSTab1.Tab = 1 Then
>    Text1.SetFocus
> ElseIf SSTab1.Tab = 2 Then
>    Text3.SetFocus
> End If
> End Sub

> >-----Original Message-----
> >There's really not much wrong with the SSTab control.. it
> does pretty much
> >everything you ask it to (if polite <g>)... post the code
> you're using
> >'cause I can't figure out your description.

> >The scary part of your post...
> >> Checkbox_Lostfocus event supposedly

> >supposedly ? Have you placed breakpoints or Debug.Prints
> there?

> >--
> >Ken Halter
> >MS-MVP-VB
> >http://www.vbsight.com
> >Please keep it in the groups..


> >> I use SSTab control with 10 pages to present information
> >> conditionally, each page having several textboxes or
> >> comboboxes.

> >> On Page 1 I use a array of CheckBoxes to decide which
> page
> >> to go and in Checkbox_Lostfocus event supposedly I set
> >> SSTab1.Tab = 2 and text2.setfocus as first control to
> get
> >> focus on that page for one of CheckBoxes. When
> >> Checkbox_Lostfocus event triggers, another page gets
> focus
> >> instead of page 3. If I don't set focus for the first
> >> control on that page, Page 3 gets focus and works. How
> to
> >> get what I wnat? Thanks!

> >.



Tue, 16 Nov 2004 22:12:49 GMT  
 What is wrong with SSTab control?
I works as you have it.. maybe LostFocus isn't firing when you thought it
should.. If you paste the code below (shouldn't need to 'cause it's your
code <g>), select one of the combos and then select any other control (even
the tab control) to make LostFocus fire, the tabs change as you have them
coded. Maybe Click is what you're after... (as astrivedi posted)
'=========
Option Explicit

Private Sub Combo1_LostFocus(Index As Integer)
   If Index = 0 Then
      SSTab1.Tab = 1
   ElseIf Index = 1 Then
      SSTab1.Tab = 2
   End If
End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)
   If SSTab1.Tab = 1 Then
      Text1.SetFocus
   ElseIf SSTab1.Tab = 2 Then
      Text3.SetFocus
   End If
End Sub
'=========

--
Ken Halter
MS-MVP-VB
http://www.vbsight.com
Please keep it in the groups..

Quote:

> Hi,

> Thank you for your help. First, you use default SSTab
> control. On page 0, draw 1 ComboBox array with two combo1,
> Page 1 with two TextBox (Text1, Text2) and Page 2 two
> TextBox(Text3, Text4). I want to Page 1 will get focus
> after Comb1 with index 0 lost focus. But by now the page
> goes to Page 2.  The code is as follow:

> Private Sub Combo1_LostFocus(Index As Integer)

> If Index = 0 Then
>    SSTab1.Tab = 1
> ElseIf Index = 1 Then
>    SSTab1.Tab = 2
> End If
> End Sub

> Private Sub SSTab1_Click(PreviousTab As Integer)

> If SSTab1.Tab = 1 Then
>    Text1.SetFocus
> ElseIf SSTab1.Tab = 2 Then
>    Text3.SetFocus
> End If
> End Sub

>> -----Original Message-----
>> There's really not much wrong with the SSTab control.. it
> does pretty much
>> everything you ask it to (if polite <g>)... post the code
> you're using
>> 'cause I can't figure out your description.

>> The scary part of your post...
>>> Checkbox_Lostfocus event supposedly

>> supposedly ? Have you placed breakpoints or Debug.Prints
> there?

>> --
>> Ken Halter
>> MS-MVP-VB
>> http://www.vbsight.com
>> Please keep it in the groups..


>>> I use SSTab control with 10 pages to present information
>>> conditionally, each page having several textboxes or
>>> comboboxes.

>>> On Page 1 I use a array of CheckBoxes to decide which
> page
>>> to go and in Checkbox_Lostfocus event supposedly I set
>>> SSTab1.Tab = 2 and text2.setfocus as first control to
> get
>>> focus on that page for one of CheckBoxes. When
>>> Checkbox_Lostfocus event triggers, another page gets
> focus
>>> instead of page 3. If I don't set focus for the first
>>> control on that page, Page 3 gets focus and works. How
> to
>>> get what I wnat? Thanks!

>> .



Tue, 16 Nov 2004 22:31:22 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. VB6: SSTab displays wrong control(s)?

2. ADO Data Control - What Am I Doing Wrong?

3. Where am i going wrong??? ActiveX Control

4. Will somebody tell me what I am doing wrong with this ListView Control

5. Referring to controls - What am I doing wrong???

6. Referring to controls - What am I doing wrong???

7. Sheridan SSTAB - Interesting problem that I am getting

8. I am trying to update a record, i am not using data control

9. I am trying to update a record, i am not using data control

10. Recordset: What am I doing wrong?

11. What am I doing wrong??

12. What am I doing wrong?

 

 
Powered by phpBB® Forum Software