473,405 Members | 2,310 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,405 software developers and data experts.

disable a tabpage control

I would like to disable a TabPage control so that my users can see that the page exists, but the selected index of the TabControl won't change if they click on the tab for it. Ideally, the TabPage's text would be displayed in the same format as, say, a disabled label.

The knowledge base says that disabling a TabPage doesn't work (by design) but it doesn't seem like it should be that hard to me.

Thanks,

--
Pat
Nov 20 '05 #1
6 2038
That's included in the source for:
A Completely OwnerDraw TabControl
http://homepage.ntlworld.com/mdaudi1...bcontrols.html

Or you may like to use my TabControlEx in place of the standard one.
http://homepage.ntlworld.com/mdaudi1.../controls.html

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...nate/home.html
"pmcguire" <pm******@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
I would like to disable a TabPage control so that my users can see that the page exists, but the selected index of the TabControl won't change if
they click on the tab for it. Ideally, the TabPage's text would be
displayed in the same format as, say, a disabled label.
The knowledge base says that disabling a TabPage doesn't work (by design)

but it doesn't seem like it should be that hard to me.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 20 '05 #2
Hi,

http://www.onteorasoftware.com/downl...tabcontrol.zip

Ken
-----------------

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote
in message news:Of*************@TK2MSFTNGP11.phx.gbl:
That's included in the source for:
A Completely OwnerDraw TabControl
HYPERLINK
"http://homepage.ntlworld.com/mdaudi100/alternate/tabcontrols.html"http://ho
mepage.ntlworld.com/mdaudi100/alternate/tabcontrols.html

Or you may like to use my TabControlEx in place of the standard one.
HYPERLINK
"http://homepage.ntlworld.com/mdaudi100/alternate/controls.html"http://homep
age.ntlworld.com/mdaudi100/alternate/controls.html


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004
Nov 20 '05 #3
Great control Ken. The only thing I've been unable to get around is it's handling of long TabPage.Text strings. They get wrapped unexpectedly. I have SORT OF handled it by padding my strings with " "'s but that is clearly not a good solution. I've tried inflating the e.bounds property in the OnDrawItem override, but it doesn't work, it seems I should be handling some event that fires before OnDrawItem, but I have no idea what that event is. Any suggestions?

Thanks
--
Pat
"Ken Tucker [MVP]" wrote:
Hi,

http://www.onteorasoftware.com/downl...tabcontrol.zip

Ken
-----------------

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote
in message news:Of*************@TK2MSFTNGP11.phx.gbl:
That's included in the source for:
A Completely OwnerDraw TabControl
HYPERLINK
"http://homepage.ntlworld.com/mdaudi100/alternate/tabcontrols.html"http://ho
mepage.ntlworld.com/mdaudi100/alternate/tabcontrols.html

Or you may like to use my TabControlEx in place of the standard one.
HYPERLINK
"http://homepage.ntlworld.com/mdaudi100/alternate/controls.html"http://homep
age.ntlworld.com/mdaudi100/alternate/controls.html


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004

Nov 20 '05 #4
Hi,

Thanks. I will have to look into the handling of long strings.

Ken
--------------

"pmcguire" <pm******@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com:
Great control Ken. The only thing I've been unable to get around is it's
handling of long TabPage.Text strings. They get wrapped unexpectedly. I
have SORT OF handled it by padding my strings with " "'s but that is clearly
not a good solution. I've tried inflating the e.bounds property in the
OnDrawItem override, but it doesn't work, it seems I should be handling some
event that fires before OnDrawItem, but I have no idea what that event is.
Any suggestions?

Thanks


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004
Nov 20 '05 #5
Let me know if you need particulars regarding how to reproduce the behavior.
--
Pat
"Ken Tucker [MVP]" wrote:
Hi,

Thanks. I will have to look into the handling of long strings.

Ken
--------------

"pmcguire" <pm******@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com:
Great control Ken. The only thing I've been unable to get around is it's
handling of long TabPage.Text strings. They get wrapped unexpectedly. I
have SORT OF handled it by padding my strings with " "'s but that is clearly
not a good solution. I've tried inflating the e.bounds property in the
OnDrawItem override, but it doesn't work, it seems I should be handling some
event that fires before OnDrawItem, but I have no idea what that event is.
Any suggestions?

Thanks


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004

Nov 20 '05 #6
Hi,

Please email them to me directly.

Ken
---------

"pmcguire" <pm******@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com:
Let me know if you need particulars regarding how to reproduce the
behavior.


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004
Nov 20 '05 #7

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

Similar topics

2
by: Ahmed Jewahar | last post by:
Dear All, I have about 31 ASP.TextBox controls on my WebForm. The name pattern of the TextBox are as follows: "TextBox1", "TextBox2"...."TexBox31". I want to disable some of them dynamically....
6
by: Mike Hnatt | last post by:
I have code that will set a drop-down list value to "xyz" and the .Enabled property to False. However, when I do that I can no longer retrieve the value "xyz" upon postback. It is as if I set the...
0
by: marius | last post by:
Hi I'm trying to disable the TreeView control of the Microsoft WebControl package. When I set the disabled-property (from javascript), the control is blured/greyed out as expected, but it still...
0
by: Robert Ladd | last post by:
Hi, I'm trying to disable the asp.net calendar control from a javascript function, but it doesn't disable the doPostBack. To simplify the situation, assume a page with 4 controls. A...
0
by: Shea | last post by:
Is there anyway to disable user controls being alive at design time? I have a user control which is throwing an exception in the constructor, and as such prevents me from loading my solution...
2
by: Jens Weiermann | last post by:
Hi, I need to conditionally disable a html (not web forms) button control. The condition is to be evaluated server-side. What is the smartest way to do this? I'm now using a literal server-side...
2
by: bartlomiej.szafraniec | last post by:
Hi! I'm trying to implement custom button. But I don't want to extend Button class. I want to extend Control class. I want to implement Enable disable functionality. But unfortunatly when...
1
by: Fred Chateau | last post by:
I am trying to run code that binds a DataGridView control on a TabPage. I inserted the code in the TabPage_Click event, but when the tab is clicked, the event never fires. I understand it is...
8
by: freeskier | last post by:
I have been using the following code to cycle through a subform and disable all textboxes on a form. If a textbox on the form has the focus when this is run I get error "can't disable a control when...
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
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.