Solved

sstab vb

Posted on 2006-06-20
7
961 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

762 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now