473,394 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Tabcontrol tabs visible

Hi All

How can I tell how many Windows forms Tabcontrol tabpage headers are visible
at any time within a Tabcontrol?

I want to display some buttons which offer horizontal scrolling of the
tabpages, but only if the number of tabpages exceeds the width of the
Tabcontrol

There is no Visiblecount property etc

Regards
Steve
Oct 5 '07 #1
2 2203
Hi Steve,

Yes, just as you have been aware of, there is no build-in support for this
function in TabControl.

Based on my knowledge, if you really wanted to get this information, you
may call TabControl.GetTabRect() method to get the rectangle of each
tabpage. Then, you may add all the tabpage rectangle width and compare it
with the TabControl client width. This may help you to find out how many
tabpages are visible in the TabControl.

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 8 '07 #2
H Jeffrey

Sorry for not getting back to you after your reply

I have gone with your suggestion and works OK

Thanks

Regards
Steve
""Jeffrey Tan[MSFT]"" <je***@online.microsoft.comwrote in message
news:Yj**************@TK2MSFTNGHUB02.phx.gbl...
Hi Steve,

Yes, just as you have been aware of, there is no build-in support for this
function in TabControl.

Based on my knowledge, if you really wanted to get this information, you
may call TabControl.GetTabRect() method to get the rectangle of each
tabpage. Then, you may add all the tabpage rectangle width and compare it
with the TabControl client width. This may help you to find out how many
tabpages are visible in the TabControl.

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

Oct 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paiam Salavati | last post by:
I have to change the BackColor of a TabControl. therefore I have overriden the onPaint-Method of TabControl like this: Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);...
1
by: Paiam Salavati | last post by:
I want to change the the color of the tabs and the color of TabControl itself in a TabControl. Therefore I wrote the following code in my customized TabControl-class: this.DrawMode =...
1
by: (Pete Cresswell) | last post by:
TabControl on the right side of a form with two tabs: Tab #1 contains two subforms that show some dynamic query results. Tab #2 contains a ListView that gets dynamically populated as the user...
0
by: Paiam Salavati | last post by:
I have to change the BackColor of the unused part to the right of the tabs in a TabControl. therefore I have overriden the onPaint-Method of TabControl like this: protected override void...
5
by: Mike Fellows | last post by:
I have a TabControl (TabControl1) containing 3 TabPage's (TabPage1, TabPage2 and TabPage3) under certain circumstances i need to make some of these tab pages invisible ive tried...
2
by: Richard | last post by:
Hi, Simple tabcontrol question: I have a tab control with a number of tabpages on it. What I want is to show a particular tabpage when I click a button that is not on the tabcontrol. Can...
4
by: Max | last post by:
I have a form in my project, which based on the user selection (probably from a combo box) has to change its content. I guess the best way to describe it is if I had a TabControl on that form, then...
2
by: Richard Carpenter | last post by:
I have a four-page tabcontrol with a gridview on each page. I have the primary key column of each gridview set to hidden (visible = false), but it still shows up on all but the first page. Anyone...
0
by: Emmanuel Thiry | last post by:
Hi, I must program a Form that contains OCXs in a TabControl, each tab of which contains a single OCX. I created that with the Designer and it works ok. For different reasons, I decide to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.