473,775 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2222
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.GetT abRect() 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.m icrosoft.comwro te in message
news:Yj******** ******@TK2MSFTN GHUB02.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.GetT abRect() 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
1402
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); SolidBrush brush = new SolidBrush(Color.YellowGreen); e.Graphics.FillRectangle(brush, rectangle);
1
1998
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 = TabDrawMode.OwnerDrawFixed; protected override void OnDrawItem(DrawItemEventArgs e) {
1
2435
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 navigates a TreeView on the left side of the form. The first time I load the ListView, if the tab containing it is not selected (i.e. the ListView is not visible) the screen draws the ListView's contents in the upper left portion of the form -...
0
2851
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 OnPaint(PaintEventArgs e) { base.OnPaint(e);
5
9170
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 me.tabpage1.visible = false but nothing happens and the tab pages is still visible
2
2838
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 anyone tell me how I would code this? Thanks Richard
4
1236
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 depending on the index of selected item from the combobox the corresponding tab would be automatically shown. The problem with that method is that the user would still have the ability to manually select the tabs, and that would cause a few...
2
2635
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 else see this behavior? How might I correct it?
0
1117
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 create a UserControl that only contains the TabControl that contains the OCXs, 1 OCX per tab. The UserControl will go to my original Form. Unfortunately the second design doesn't work well. The first tab shows its
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4014
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.