|
-
Nov 20th, 2009, 05:53 PM
#1
Thread Starter
Member
[RESOLVED] Rearranging Tabs On ssTab Control
I'm a new member of this forum although I have perused it a bit in the past.
I'm a very experienced VB6 programmer, but have never used ssTab until my current project. Yeah, I know, some believe that TabStrip is better for use, but I used ssTab and I'm staying with it unless it's absolutely necessary to change to TabStrip or something else.
I've searched the archives back to the year 1 (That's 0001, NOT 2001!!), and while I've seen my question asked once or twice, I've never seen a straight answer in response. Is it possible to rearrange the tabs on my page?? I do NOT need the capability to do this in run time, only during design time. I've searched and read and tried until I'm blue in the face with no success, and have come to the conclusion that there does not appear to be any way to do what to me seems like a very fundamental design function.
Am I all wet here or is there simply no way to do this??
Thanks
Chief Brad
-
Nov 20th, 2009, 07:01 PM
#2
Re: Rearranging Tabs On ssTab Control
Welcome to Forums, Brad! 
SSTab is a very old control - I believe it was introduced by what used to be Sheridan back in [at least] VB4 days.
Control does not offer much functionality to say the least - imho it only offers one advantage: each tab is container and they can be change even at design time.
As far as rearranging tabs I'm not quite sure what you mean. 
How do need them to be rearranged?
Changing tabs captions can also be considered as "rearranging".
If you're asking how to move controls easily from one tab to another (and vise versa) then placing them inside picturebox could be solution (you'd have to have picturebox on each tab).
-
Nov 20th, 2009, 07:21 PM
#3
Thread Starter
Member
Re: Rearranging Tabs On ssTab Control
As a way of answering your question, let me explain basically what happened. I the earlier stagesof my design, I identifed only two tabs ("A" and "B") as being required, and that's what I used. After beau coup development and code being written, I ultimately decided that it would be advantageous to have two additional tabs ("C" and "D"). It's obviously no problem at all to add the two additional tabs to ssTab, but the most logical positioning of the four tabs would be in the order of "A" "C" "B" "D".
Being totally new to ssTab, I failed to put the controls on my individual tabs in any kind of a frame, so now if I want to move what's currently in "B" to the new tab "C", I'll have to copy all of the controls from "B" to "C" (not a big job in itself) and THEN realign the left and top positions of each control individually to be positioned properly on "C".
Much work, but it's appearing that it's probably my only option.
Chief Brad
-
Nov 20th, 2009, 07:39 PM
#4
Thread Starter
Member
Re: Rearranging Tabs On ssTab Control
I just played around with TabStrip for a few minutes, and at least it will allow me to insert a new tab between two existing tabs, "C" between "A" and "B" in my previous example. Switching to TabStrip though will still require the pretty massive re-design time to cut and paste all of my existing controls into a frame for each tab, and then re-aligning each of them correctly. Not exactly what I had in mind when I thought about a pleasant Friday evening!!
Brad
-
Nov 20th, 2009, 07:57 PM
#5
Re: Rearranging Tabs On ssTab Control
You are moving in the right direction although it will require a bit more work.
Here's one thing [at least] that nicely handled by TabStrip and is a big headach with SSTab:
try changing tab orientation (in tabstrip as I recall it's a Placement property) - tops and bottoms are fine but when you attmpt to make it left/right SSTab wil scream at you because it won't be able to rotate the font; TabStrip handles this very well and quietly...
That is just one reason of many why TabStrip is a better control.
Regards.
-
Nov 20th, 2009, 08:11 PM
#6
Thread Starter
Member
Re: Rearranging Tabs On ssTab Control
Thanks, and I think this is the direction that I need to go. What the heck, I've got all night to work on it anyway.
I don't have a good reference that shows TabStrip, but I see that I can't address the individual tabs using .Tab. In ssTab I can use ssTab1.Tab = 1 or If ssTab1.Tab = 1 Then. How do I perform the same function with TabStrip??
-
Nov 20th, 2009, 08:26 PM
#7
Re: Rearranging Tabs On ssTab Control
Something to keep in mind if you distribute your app the TABCTL32.OCX does not work correctly on some systems. I finally quite using it and just created my
own with graphical command buttons, pictureboxes and changing the zorder. Don't know about tabstrip, never used it.
http://www.vbforums.com/showthread.php?t=587954
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Nov 21st, 2009, 12:45 PM
#8
Re: Rearranging Tabs On ssTab Control
 Originally Posted by Chief Brad
... In ssTab I can use ssTab1.Tab = 1 or If ssTab1.Tab = 1 Then. How do I perform the same function with TabStrip??
There are many properties that you can use - TabIndex, Key, etc.
Exlpore them all but technic is basically the same - you said you are "very experienced" so it shouldn't take long to figure out the rest.
Code:
Private Sub TabStrip1_Click()
Select Case TabStrip1.TabIndex 'tabindex starts with 1
Case 1
'...
Case 2
'...
Case Else
'...
End Select
'or
Select Case TabStrip1.SelectedItem.Index 'you can also use Key, Caption, etc...
Case 1
'...
Case 2
'...
Case Else
'...
End Select
'and so on...
End Sub
Good luck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|