|
-
Mar 22nd, 2005, 12:00 PM
#1
Thread Starter
New Member
disable TextBox
Hello,
I was looking for a way to disable a TabPage of a TabControl object.
Do you know if it is possible?
Thank you
-
Mar 22nd, 2005, 12:23 PM
#2
Not NoteMe
Re: disable TextBox
Welcome to the forums! 
Code:
MyTabControlTabPages[IndexOfTabToDisable].CanSelect = false;
I think that'll do it.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Mar 22nd, 2005, 03:14 PM
#3
Thread Starter
New Member
Re: disable TextBox
Unfortunately it doesn't function (CanSelect is a read-only property...)
I also tried with CanFocus property, but it's the same (it's read-only too).
Then, I also tried to use the Hide() method (I would prefer to disable and not to hide the TabPage, however), but the statement has no effect (the TabPage remains visible).
-
Mar 24th, 2005, 04:25 AM
#4
Hyperactive Member
Re: disable TextBox
Try this:
tabControl1.TabPages[0].Enabled = false;
Although, the IDE does not give the .Enabled property option, this works.
Thanks
Jemima.
"Your worst days are never so bad that you are beyond the reach of God's grace...
and your best days are never so good that you are beyond the need of God's grace."
-
Mar 25th, 2005, 09:20 AM
#5
Thread Starter
New Member
Re: disable TextBox
I tried to use the Enabled property in both the ways:
tabControl1.TabPages[0].Enabled = false;
tabPage0.Enabled = false;
Even if "Enabled" isn't a TabPage property, the compiler gives no errors and the program runs (as Jemima said), but the problem is still there: the tabPage isn't disabled...
-
Mar 26th, 2005, 10:15 PM
#6
Hyperactive Member
Re: disable TextBox
Oh!! When I tried out, I found all the controls on TabPage1 got disabled.
Well.. let me know if that doesn't happen.. I'll look out if there's an alternate solution.
Jemima.
"Your worst days are never so bad that you are beyond the reach of God's grace...
and your best days are never so good that you are beyond the need of God's grace."
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
|