A question about SSTab as container 
Author Message
 A question about SSTab as container

hi,

when at program time, you can put controls such as textbox onto different
SSTab tabs, but at run time, how to put controls onto different SSTab tabs?

my situation is:
I put a SSTab with one Tab on a form and create a textbox control array, at
run time, I add tabs by modify the value of .Tabs, and I want to put a
textbox on each tabs, but when I load textboxes and set their .container
property, they are all displayed on the first Tab, how to make them to be
associated with different Tabs?

thanks

Rick



Mon, 08 Dec 2003 19:32:14 GMT  
 A question about SSTab as container
Change the tab to the number you want the box to appear on *before* setting
the textbox's container property.


Quote:
> hi,

> when at program time, you can put controls such as textbox onto different
> SSTab tabs, but at run time, how to put controls onto different SSTab
tabs?

> my situation is:
> I put a SSTab with one Tab on a form and create a textbox control array,
at
> run time, I add tabs by modify the value of .Tabs, and I want to put a
> textbox on each tabs, but when I load textboxes and set their .container
> property, they are all displayed on the first Tab, how to make them to be
> associated with different Tabs?

> thanks

> Rick



Mon, 08 Dec 2003 22:53:58 GMT  
 A question about SSTab as container
you mean

sstab1.tab=2
set textbox1.container=sstab1

right?
I tried, but it doesn't work.

Rick


Quote:
> Change the tab to the number you want the box to appear on *before*
setting
> the textbox's container property.



> > hi,

> > when at program time, you can put controls such as textbox onto
different
> > SSTab tabs, but at run time, how to put controls onto different SSTab
> tabs?

> > my situation is:
> > I put a SSTab with one Tab on a form and create a textbox control array,
> at
> > run time, I add tabs by modify the value of .Tabs, and I want to put a
> > textbox on each tabs, but when I load textboxes and set their .container
> > property, they are all displayed on the first Tab, how to make them to
be
> > associated with different Tabs?

> > thanks

> > Rick



Tue, 09 Dec 2003 18:49:25 GMT  
 A question about SSTab as container
Try this...

New project with ssTab1, Text1(0) and cmdAddATab
'================
Option Explicit

Private Sub Form_Load()
   SSTab1.Tabs = 1
End Sub

Private Sub cmdAddATab_Click()
   Dim i As Integer
   'Add another tab
   With SSTab1
      .TabsPerRow = .Tabs + 1
      .Tabs = .Tabs + 1
      'select the new tab
      .Tab = .Tabs - 1
   End With

   'Add another textbox
   i = Text1.UBound + 1
   Load Text1(i)
   With Text1(i)
      Set .Container = SSTab1
      .Move 120, 500
      .Visible = True
   End With
End Sub
'================


Quote:
> you mean

> sstab1.tab=2
> set textbox1.container=sstab1

> right?
> I tried, but it doesn't work.

> Rick



> > Change the tab to the number you want the box to appear on *before*
> setting
> > the textbox's container property.



> > > hi,

> > > when at program time, you can put controls such as textbox onto
> different
> > > SSTab tabs, but at run time, how to put controls onto different SSTab
> > tabs?

> > > my situation is:
> > > I put a SSTab with one Tab on a form and create a textbox control
array,
> > at
> > > run time, I add tabs by modify the value of .Tabs, and I want to put a
> > > textbox on each tabs, but when I load textboxes and set their
.container
> > > property, they are all displayed on the first Tab, how to make them to
> be
> > > associated with different Tabs?

> > > thanks

> > > Rick



Tue, 09 Dec 2003 22:17:22 GMT  
 A question about SSTab as container
Thank you, Ken
I solved the problem.

Rick


Quote:
> Try this...

> New project with ssTab1, Text1(0) and cmdAddATab
> '================
> Option Explicit

> Private Sub Form_Load()
>    SSTab1.Tabs = 1
> End Sub

> Private Sub cmdAddATab_Click()
>    Dim i As Integer
>    'Add another tab
>    With SSTab1
>       .TabsPerRow = .Tabs + 1
>       .Tabs = .Tabs + 1
>       'select the new tab
>       .Tab = .Tabs - 1
>    End With

>    'Add another textbox
>    i = Text1.UBound + 1
>    Load Text1(i)
>    With Text1(i)
>       Set .Container = SSTab1
>       .Move 120, 500
>       .Visible = True
>    End With
> End Sub
> '================



> > you mean

> > sstab1.tab=2
> > set textbox1.container=sstab1

> > right?
> > I tried, but it doesn't work.

> > Rick



> > > Change the tab to the number you want the box to appear on *before*
> > setting
> > > the textbox's container property.



> > > > hi,

> > > > when at program time, you can put controls such as textbox onto
> > different
> > > > SSTab tabs, but at run time, how to put controls onto different
SSTab
> > > tabs?

> > > > my situation is:
> > > > I put a SSTab with one Tab on a form and create a textbox control
> array,
> > > at
> > > > run time, I add tabs by modify the value of .Tabs, and I want to put
a
> > > > textbox on each tabs, but when I load textboxes and set their
> .container
> > > > property, they are all displayed on the first Tab, how to make them
to
> > be
> > > > associated with different Tabs?

> > > > thanks

> > > > Rick



Tue, 09 Dec 2003 23:28:38 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. sstab as a container for created objects.

2. SSTab - Container - Tab order quirk

3. How can I use SSTab Control to container a form

4. SSTab question and general unrelated API question..........

5. Custom Control: Container inside container...

6. Moving Controls from Container to Container

7. Custom Control: Container inside container...

8. OLE container question

9. Please Help.....Container and Module questions

10. Newbie Question: Project Container Window

11. Binding to an OLE Container Question

12. Newbie Question: Project Container Window

 

 
Powered by phpBB® Forum Software