resizing forms containing the sstab control 
Author Message
 resizing forms containing the sstab control

When I resize a form to adjust for resolution, only the
active tab on the sstab control is visiable. The sstab has
4 tabs and depending on which had the focus when the form
was closed, that is the only one that has visible controls
on it when the form is reloaded. I know the sstab hides
controls on inactive tabs by setting their left property
values less by 75000. I've tried the codein the KB article
Q187562 but it doesn't resolve the problem.

Any Ideas?



Sun, 18 Jan 2004 05:30:35 GMT  
 resizing forms containing the sstab control
I haven't tried the resize code but... your life may get a bit easier if you
place a frame on each tab (border/caption optional) and place your controls
inside those frames. Then, all you'd need to do is worry about 4 frames
'cause those'll be the only controls that report a negative left. Controls
contained by those frames will (should) resize correctly. Just for kicks, I
plopped an sstab on a form and added an array of frames, one for each tab
with their index number matching the tab number (I also set their
borderstyle to 0 which means you can't even see them) and placed the
following code in th sstabs click event to resize the frame on the current
tab. You might play with the idea a bit.. that is, let your resize code
resize everything except controls that have a Left < 0 and then the code
below should resize the frames whenever you click a tab... seems like it
oughta work.
'==================
Private Sub SSTab1_Click(PreviousTab As Integer)
   Dim i As Integer
   Dim iTPP As Integer
   Dim iTop As Integer

   With SSTab1
      iTPP = Screen.TwipsPerPixelX
      iTop = .TabHeight + iTPP * 5
      For i = 0 To .Tabs - 1
         fraTab(i).Enabled = (i = .Tab)
         If i = .Tab Then
            fraTab(i).Move iTPP * 4, iTop, .Width - iTPP * 8, .Height -
iTop - iTPP * 4
         End If
      Next i
   End With
End Sub
'==================


Quote:
> When I resize a form to adjust for resolution, only the
> active tab on the sstab control is visiable. The sstab has
> 4 tabs and depending on which had the focus when the form
> was closed, that is the only one that has visible controls
> on it when the form is reloaded. I know the sstab hides
> controls on inactive tabs by setting their left property
> values less by 75000. I've tried the codein the KB article
> Q187562 but it doesn't resolve the problem.

> Any Ideas?



Sun, 18 Jan 2004 07:31:31 GMT  
 resizing forms containing the sstab control
Yes, I also think using a frame is a good idea.


Sun, 18 Jan 2004 15:10:28 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. No Resizing SSTab-Contained Controls from a UserControl

2. Setting TAB order in a form which contains an SSTAB control

3. SSTab control and resizing a form

4. Resizing controls on SSTab causes some controls to always appear on top

5. SSTAB - determining the tab that contains a control

6. SSTabs dissapear after resizing form

7. Question - How to resize controls contained in a tab (VB4)

8. sstab control - resizing during runtime problem

9. Resizing SSTab makes controls superimpose over each other!

10. Urgent! How auto resize SSTAB control

11. Resizing the controls in sstab

12. Problem With SSTAB-Control if resize

 

 
Powered by phpBB® Forum Software