[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

sstab vb

Posted on 2006-06-20
7
Medium Priority
?
979 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 1200 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 800 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
Industry Leaders: 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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.
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…
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…
Suggested Courses

650 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