Solved

sstab vb

Posted on 2006-06-20
7
973 Views
Last Modified: 2013-12-25
I have a project and depending on a login, I hide some tabs on an sstab
        SSTab1.TabVisible(1) = False

for some reason when I do this, there is a white block where the missing tab was.

How do I prevent this.

The underlying form is grey, the correct color.

Thanks
0
Comment
Question by:jackjohnson44
  • 4
  • 2
7 Comments
 
LVL 4

Accepted Solution

by:
abdulhameeds earned 300 total points
ID: 16948625
just give the sstab control the same color of the form then

you can visible ant tabs

i.e assign the sstab back color to the same coloe of the form you will not see any change but when you visible false
you will not see the color


best regards

0
 
LVL 1

Assisted Solution

by:mostafa_lotfy55
mostafa_lotfy55 earned 200 total points
ID: 16948941
you don't need to change color or any thing you just need to reduce tab preview by one so the  block of missing tab doesn't appear

for example you have a 3 tabs then you make the preview tabs 2 after making your desired tabsVisible to false

so you will make your tabpreview to the exact number of your currently visible tabs
as in the following example

so, you answer is

SSTab1.TabVisible(1) = False
SSTab1.TabsPerRow = SSTab1.TabsPerRow - 1

I hope that solve your problem
best regards
0
 
LVL 9

Expert Comment

by:pradapkumar
ID: 16957333
I tried you code snippet in my machine. But it works fine. Then y u wish to change your program? First try to install Service pack 6 for vs 6. then try the same thing.
I tested the sstab1's tabvisible property with the following code snippet

Private Sub Command1_Click()
    Static i As Integer
    SSTab1.TabVisible(i) = False
    i = i + 1
End Sub


The above program works fine.
Pradap Kumar
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:mostafa_lotfy55
ID: 16957487
dear pradapkumar i think you missed the point
the problem will not appear to you unless you change the form background
then you will notice the missing blank tab

so the answer as i said before he can make the number of tabs preview equal to the number of visible tabs
or chnage the backgroung of sstab to same color of the form background

best regards
Mostafa_Lotfy55
0
 
LVL 1

Expert Comment

by:mostafa_lotfy55
ID: 16957577
I missed to edit your snippise code

then your solution is one of two

1- The First solution

Private Sub Command1_Click()
  Static i As Integer
    If i >= SSTab1.Tabs Then Exit Sub        // to be sure ther's no run time error
    SSTab1.TabVisible(i) = False                 // Hide The Tab number i
    i = i + 1                                              
    SSTab1.BackColor = Me.BackColor
End Sub


2- the second solution

Private Sub Command2_Click()
SSTab1.TabVisible(1) = False
If SSTab1.TabsPerRow <= 1 Then Exit Sub
SSTab1.TabsPerRow = SSTab1.TabsPerRow - 1  
End Sub

I hope that solve your prblem  jackjohnson44
best regards
Mostafa_Lotfy55
0
 
LVL 9

Expert Comment

by:pradapkumar
ID: 16958247
Dear Mostafa

Yes the problem comes when the form's background changed. But that blank box is appearing when all the tabs were changed as invisible.
0
 
LVL 1

Expert Comment

by:mostafa_lotfy55
ID: 16958921
dear pradapkumar
in case that all your tabs are invisible
then make the control itself SSTab invisible as follow

SSTab1.Visible = False

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question