Solved

sstab vb

Posted on 2006-06-20
7
974 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Excel - Save a copy of work book 13 91
How to Add / Edit Windows Menu 4 74
MS Access 03, TransferText, decimal places 8 85
backup program with robocopy 6 74
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 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