Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Tabstrip Tabs Width

I'm using a Tabstrip control.
I would like to position a textbox just to the right of the rightmost
visible tab.
Since the number and width of those tabs will vary, I need a way to
figure out the current width of all visible tabs.

Is this possible?

Thanks.

Darren
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Tabstrip Tabs Width

Darren,

You could force the width to be a standard by using the TabFixedWidth property. Or just put the
textbox on the userform in a consistent location. Or use the Contril Tip Text of the tab to contain
your text.

HTH,
Bernie
MS Excel MVP


"Darren Hill" wrote in message
...
I'm using a Tabstrip control.
I would like to position a textbox just to the right of the rightmost visible tab.
Since the number and width of those tabs will vary, I need a way to figure out the current width
of all visible tabs.

Is this possible?

Thanks.

Darren



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Tabstrip Tabs Width

Try adding all the tab captions to a hidden textbox, font same as the
tabstrip and its Autosize property true. Will also need to add a bit of
padding for each tab and deduct a bit of padding in the textbox. If you play
around should get it pretty close.
newLeft = tabstrip1.left + textbox1.width

Regards,
Peter T

"Darren Hill" wrote in message
...
I'm using a Tabstrip control.
I would like to position a textbox just to the right of the rightmost
visible tab.
Since the number and width of those tabs will vary, I need a way to
figure out the current width of all visible tabs.

Is this possible?

Thanks.

Darren



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Tabstrip Tabs Width

I've Hi, Bernie.
I've tried fiddling around with the TabFixedWidth property but I must be
doing something wrong - as all but one of my tabs vanish when I use it.
Can you give a simple example of using the tabfixedwidth ?

I can't use the Control Tip, because the text box allows data entry.

Thanks for the suggestions, though.

Darren
Bernie Deitrick wrote:
Darren,

You could force the width to be a standard by using the TabFixedWidth property. Or just put the
textbox on the userform in a consistent location. Or use the Contril Tip Text of the tab to contain
your text.

HTH,
Bernie
MS Excel MVP


"Darren Hill" wrote in message
...
I'm using a Tabstrip control.
I would like to position a textbox just to the right of the rightmost visible tab.
Since the number and width of those tabs will vary, I need a way to figure out the current width
of all visible tabs.

Is this possible?

Thanks.

Darren



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Tabstrip Tabs Width

Oh, that looks like something I can do.
Thanks for the suggestion, Peter. I'll start experimenting.

Darren

Peter T wrote:
Try adding all the tab captions to a hidden textbox, font same as the
tabstrip and its Autosize property true. Will also need to add a bit of
padding for each tab and deduct a bit of padding in the textbox. If you play
around should get it pretty close.
newLeft = tabstrip1.left + textbox1.width

Regards,
Peter T

"Darren Hill" wrote in message
...
I'm using a Tabstrip control.
I would like to position a textbox just to the right of the rightmost
visible tab.
Since the number and width of those tabs will vary, I need a way to
figure out the current width of all visible tabs.

Is this possible?

Thanks.

Darren





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Tabstrip Tabs Width

Darren,

Create a new userform, insert a tab strip, and then use the code below in the userform's module.
Each click on the userform will increase the tabwidth, and a double-click will reset it. See what
happens....

HTH,
Bernie
MS Excel MVP


Private Sub UserForm_Click()
UserForm1.TabStrip1.TabFixedWidth = UserForm1.TabStrip1.TabFixedWidth + 20
End Sub

Private Sub UserForm_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
UserForm1.TabStrip1.TabFixedWidth = 20
End Sub

Private Sub UserForm_Initialize()
Dim i As Integer
i = 1
With Me
.Width = 500
.Height = 500
With .TabStrip1
While .Tabs.Count < 5
.Tabs.Add "New tab" & i
i = i + 1
Wend
.MultiRow = True
.Width = 400
.Height = 400
.TabFixedWidth = 20
.Left = 50
.Top = 50
End With
End With
End Sub


"Darren Hill" wrote in message
...
I've Hi, Bernie.
I've tried fiddling around with the TabFixedWidth property but I must be doing something wrong -
as all but one of my tabs vanish when I use it.
Can you give a simple example of using the tabfixedwidth ?

I can't use the Control Tip, because the text box allows data entry.

Thanks for the suggestions, though.

Darren
Bernie Deitrick wrote:
Darren,

You could force the width to be a standard by using the TabFixedWidth property. Or just put the
textbox on the userform in a consistent location. Or use the Contril Tip Text of the tab to
contain your text.

HTH,
Bernie
MS Excel MVP


"Darren Hill" wrote in message
...
I'm using a Tabstrip control.
I would like to position a textbox just to the right of the rightmost visible tab.
Since the number and width of those tabs will vary, I need a way to figure out the current width
of all visible tabs.

Is this possible?

Thanks.

Darren



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Tabstrip Tabs Width

Thanks for the code.
I was a bit confused at first, since the double click seems to be a bit
sensitive on my set up. I thought I was just single clicking, which had
me examining you code to find what was causing the unpredictable return
to starting conditions. Oops :)
But I understand now. Thanks again.



Bernie Deitrick wrote:
Darren,

Create a new userform, insert a tab strip, and then use the code below in the userform's module.
Each click on the userform will increase the tabwidth, and a double-click will reset it. See what
happens....

HTH,
Bernie
MS Excel MVP


Private Sub UserForm_Click()
UserForm1.TabStrip1.TabFixedWidth = UserForm1.TabStrip1.TabFixedWidth + 20
End Sub

Private Sub UserForm_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
UserForm1.TabStrip1.TabFixedWidth = 20
End Sub

Private Sub UserForm_Initialize()
Dim i As Integer
i = 1
With Me
.Width = 500
.Height = 500
With .TabStrip1
While .Tabs.Count < 5
.Tabs.Add "New tab" & i
i = i + 1
Wend
.MultiRow = True
.Width = 400
.Height = 400
.TabFixedWidth = 20
.Left = 50
.Top = 50
End With
End With
End Sub


"Darren Hill" wrote in message
...
I've Hi, Bernie.
I've tried fiddling around with the TabFixedWidth property but I must be doing something wrong -
as all but one of my tabs vanish when I use it.
Can you give a simple example of using the tabfixedwidth ?

I can't use the Control Tip, because the text box allows data entry.

Thanks for the suggestions, though.

Darren
Bernie Deitrick wrote:
Darren,

You could force the width to be a standard by using the TabFixedWidth property. Or just put the
textbox on the userform in a consistent location. Or use the Contril Tip Text of the tab to
contain your text.

HTH,
Bernie
MS Excel MVP


"Darren Hill" wrote in message
...
I'm using a Tabstrip control.
I would like to position a textbox just to the right of the rightmost visible tab.
Since the number and width of those tabs will vary, I need a way to figure out the current width
of all visible tabs.

Is this possible?

Thanks.

Darren


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabstrip and Treeview Sanjay[_2_] Excel Programming 0 April 12th 07 10:23 PM
Tabstrip kirkm[_6_] Excel Programming 2 March 11th 07 01:58 AM
Tabstrip related tkraju via OfficeKB.com Excel Programming 0 August 5th 06 02:13 AM
Tabstrip tabs entered programmatically disappear after form unload cumchee Excel Programming 1 January 21st 05 08:04 PM
Tabstrip control Ric[_4_] Excel Programming 1 March 6th 04 11:08 PM


All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"