|
-
May 23rd, 2000, 10:22 PM
#1
Thread Starter
Addicted Member
Hello!
I use a tabstrip to let the user switch between different textfiles, but I also use a command to let them do it without click the tabstrip.
Is there a way to make the tabstrip change, without to click it?
I can call the function Tab_Click(), but it doesn't take any arguments. And Tab.SelectedItem.Index is Read-Only property.
Any help appreciated!
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 23rd, 2000, 10:32 PM
#2
Frenzied Member
use the SStab control instead because it's much better.
then you can change tabs by
SSTab1.Tab = 2'or whatever
you can then do a select in SSTab1_Click
Private Sub SSTab1_Click(PreviousTab As Integer)
MsgBox SSTab1.Tab
End Sub
-
May 23rd, 2000, 10:42 PM
#3
Thread Starter
Addicted Member
Exactly how do you mean?
Could you post the code for making it select another tab (without clicking the tab)?
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 24th, 2000, 12:10 AM
#4
Addicted Member
What mark means is that you can set the tab of the tabstrip through code instead of clicking. The code used to do that is sstab1.tab = X, but you need to decide HOW you want it to change, whether by commands buttons (which doesn't make sense since you want an alternative way to clicking the tab) or by a keystroke. In the case if the keystroke, you would need to trap the keydown or keyup event of the form (set keypreview to true on the form). If you need an example of how this is done, let me know.
Thai
-
May 24th, 2000, 09:05 PM
#5
Thread Starter
Addicted Member
What I really want to is when yhe user opens a new (text)file i want it to be the active text, and then I want the tabstrip to change to show this.
But I'd very much appreciate an example, my brain seems a little bit slow for the moment.
I was editing video for a biology project until two this morning, and then I failed completely on e test in German.
Sigh...
So please, post an example.
Thanks a lot,
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 27th, 2000, 05:57 AM
#6
Thread Starter
Addicted Member
Well, I tested with a SSTab, but it seems as if it can't contain less tabs then three.
Is there a way round this? I want to be able to start on one and let the user add och remove tabs on at the time.
It seems very unnecessary to have a lower limit for the number of tabs, or is there a reason for it?
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 29th, 2000, 02:51 PM
#7
Frenzied Member
You can have just one tab on an SSTab!
right-click on the control
click properties
and set Tab Count to 1
-
May 30th, 2000, 04:56 AM
#8
Thread Starter
Addicted Member
Well, I tried but it says it's "Invalid Property Value"
That happens when I try to set the number of tabs to a number below three, eiter at designtime or ruintime.
Is this a bug in VB?
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 31st, 2000, 06:29 PM
#9
Thread Starter
Addicted Member
Just posting to get it back on top again.
Please, I really need some help here.
Pentax
-
May 31st, 2000, 06:39 PM
#10
Fanatic Member
Give this a whirl
Code:
TabStrip1.Tabs(iIndex).Selected = True
Where iIndex is the index of tab that you want to show. Simple really.
Iain, thats with an i by the way!
-
Jun 1st, 2000, 03:30 AM
#11
Thread Starter
Addicted Member
Well, yes, that's easy but it's not really my problem.
I can't get the number of tabs to be less then three. Every time I try to set the number to one or two, at designtime or runtim, it says invalid value property.
What have I done wrong?
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
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
|