Hi all,
If I have a main form with a TabControl and this method:
protected void NewTab()
{
TabPage newTab;
newTab = new TabPage();
newTab.BackColo r = System.Drawing. SystemColors.Wi ndow;
newTab.Size = new System.Drawing. Size(498, 400);
RichTextBox richTextBox;
richTextBox = new PoccoRichTextBo x();
newTab.Controls .Add(richTextBo x);
tabControl.Cont rols.Add(newTab );
}
This adds a TabPage as I want, but then I find I am stuck not knowing
howto reference things.
How could I expand the above so that I can insert text into the textBox
and bring the tab to the front of the TabControl?
Your help would be great.
Mat 3 3283
Hi,
IIRC that code will give you error, you cannot add a TabPage to the Control
collection of the tabcontrol, you have to use TabPages
In order to select it do
tabcontrol.Sele ctedIndex = tabControl.TabP ages.Count -1;
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"mat" <yu************ ********@yahoo. co.uk> wrote in message
news:d4******** **@newsg1.svr.p ol.co.uk... Hi all,
If I have a main form with a TabControl and this method:
protected void NewTab() { TabPage newTab; newTab = new TabPage(); newTab.BackColo r = System.Drawing. SystemColors.Wi ndow; newTab.Size = new System.Drawing. Size(498, 400);
RichTextBox richTextBox; richTextBox = new PoccoRichTextBo x();
newTab.Controls .Add(richTextBo x); tabControl.Cont rols.Add(newTab ); }
This adds a TabPage as I want, but then I find I am stuck not knowing howto reference things.
How could I expand the above so that I can insert text into the textBox and bring the tab to the front of the TabControl?
Your help would be great.
Mat
Hi,
IIRC that code will give you error, you cannot add a TabPage to the Control
collection of the tabcontrol, you have to use TabPages
In order to select it do
tabcontrol.Sele ctedIndex = tabControl.TabP ages.Count -1;
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"mat" <yu************ ********@yahoo. co.uk> wrote in message
news:d4******** **@newsg1.svr.p ol.co.uk... Hi all,
If I have a main form with a TabControl and this method:
protected void NewTab() { TabPage newTab; newTab = new TabPage(); newTab.BackColo r = System.Drawing. SystemColors.Wi ndow; newTab.Size = new System.Drawing. Size(498, 400);
RichTextBox richTextBox; richTextBox = new PoccoRichTextBo x();
newTab.Controls .Add(richTextBo x); tabControl.Cont rols.Add(newTab ); }
This adds a TabPage as I want, but then I find I am stuck not knowing howto reference things.
How could I expand the above so that I can insert text into the textBox and bring the tab to the front of the TabControl?
Your help would be great.
Mat
Ignacio Machin ( .NET/ C# MVP ) wrote: Hi,
IIRC that code will give you error, you cannot add a TabPage to the Control collection of the tabcontrol, you have to use TabPages
In order to select it do tabcontrol.Sele ctedIndex = tabControl.TabP ages.Count -1;
cheers,
Hi Ignacio,
Thank you for your response. I found this useful:
tabcontrol.Sele ctedIndex = tabControl.TabP ages.Count -1;
....but I didn't quite understand this:
you cannot add a TabPage to the Control collection of the tabcontrol,
you have to use TabPages?
It seems to work when I do it??
Mat This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: softwareengineer2006 |
last post by:
All Interview Questions And Answers
10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP)
I have listed over 10000 interview questions asked
in interview/placement test papers for all companies between year
2000-2005
in my website
http://www.geocities.com/allinterviewquestion/
So please have a look and make use of it.
|
by: connectrajesh |
last post by:
INTERVIEWINFO.NET
http://www.interviewinfo.net
FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES
NO ADVERTISEMENT
|
by: freepdfforjobs |
last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions
http://www.questpond.com/SampleInterviewQuestionBook.zip
Download the JAVA , .NET and SQL Server interview sheet and rate
yourself. This will help you judge yourself are you really worth of
attending interviews. If you own a company best way to judge if the
candidate is worth of it.
http://www.questpond.com/InterviewRatingSheet.zip
|
by: Drew |
last post by:
I posted this to the asp.db group, but it doesn't look like there is much
activity on there, also I noticed that there are a bunch of posts on here
pertaining to database and asp. Sorry for cross-posting.
I am trying to build a "checklist", where a user can navigate to an ASP page
on the intranet which shows a list of "questions" that the user can check
off. I am trying to figure out how to do this so that it is scalable, but I
am...
|
by: Krypto |
last post by:
Hi,
I have used Python for a couple of projects last year and I found it
extremely useful. I could write two middle size projects in 2-3 months
(part time). Right now I am a bit rusty and trying to catch up again
with Python.
I am now appearing for Job Interviews these days and I am wondering if
anybody of you appeared for a Python Interview. Can you please share
the questions you were asked. That will be great help to me.
| |
by: ramu |
last post by:
C# Interview Questions and Answers8
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html
C# Interview Questions and Answers7
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html
C# Interview Questions and Answers 6
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html
C# Interview Questions and Answers 5...
|
by: ramu |
last post by:
C# Interview Questions and Answers8
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html
C# Interview Questions and Answers7
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html
C# Interview Questions and Answers 6
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html
C# Interview Questions and Answers 5...
|
by: ramu |
last post by:
C# Interview Questions and Answers8
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html
C# Interview Questions and Answers7
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html
C# Interview Questions and Answers 6
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html
C# Interview Questions and Answers 5...
|
by: reema |
last post by:
EJB Interview Questions
http://interviewdoor.com/technical/EJB-Interview-Questions.htm
CSS Interview Questions
http://interviewdoor.com/technical/CSS-Interview-Questions.htm
C Interview Questions
http://interviewdoor.com/technical/C-Interview-Questions.htm
C# Interview Questions
http://interviewdoor.com/technical/C-sharp-Interview-Questions.htm
C++ Interview Questions
http://interviewdoor.com/technical/C++-Interview-Questions.htm
|
by: reema |
last post by:
EJB Interview Questions
http://interviewdoor.com/technical/EJB-Interview-Questions.htm
CSS Interview Questions
http://interviewdoor.com/technical/CSS-Interview-Questions.htm
C Interview Questions
http://interviewdoor.com/technical/C-Interview-Questions.htm
C# Interview Questions
http://interviewdoor.com/technical/C-sharp-Interview-Questions.htm
C++ Interview Questions
http://interviewdoor.com/technical/C++-Interview-Questions.htm
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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,...
|
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...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |