Click here to Skip to main content
15,913,773 members
Home / Discussions / C#
   

C#

 
GeneralRe: obfuscation Pin
Moreno Airoldi2-Aug-09 0:58
Moreno Airoldi2-Aug-09 0:58 
Questionread data from existing tcp connection Pin
Tris Setiawan31-Jul-09 19:46
Tris Setiawan31-Jul-09 19:46 
AnswerRe: read data from existing tcp connection Pin
stancrm31-Jul-09 19:56
stancrm31-Jul-09 19:56 
GeneralRe: read data from existing tcp connection Pin
Tris Setiawan31-Jul-09 20:25
Tris Setiawan31-Jul-09 20:25 
Questionusing tab control Pin
gal00031-Jul-09 6:59
gal00031-Jul-09 6:59 
AnswerRe: using tab control Pin
Xmen Real 31-Jul-09 7:04
professional Xmen Real 31-Jul-09 7:04 
GeneralRe: using tab control Pin
gal00031-Jul-09 18:45
gal00031-Jul-09 18:45 
AnswerRe: using tab control Pin
Baeltazor31-Jul-09 7:32
Baeltazor31-Jul-09 7:32 
Hi,

If the Rich Text Box is the first control inside the tabpage, then there are two ways you can acheive this:

Directly access the RTB:

tabControl1.SelectedTab.Controls[0].Text = "I have just accessed my Rich Text Box and put text in it";


OR:

RichTextBox rtb = tabControl1.SelectedTab.Controls[0] as RichTextBox;
rtb.Text = "I have just accessed my Rich Text Box and put text in it";


I'll explain the above code a little:

First, we access the tabControl, and say, "we need to look inside the Selected Tab", then we say goto Control[0] (0 being the very first control inside the selected tabpage). Then we use .Text to access the Text property of the RichTextBox control and write something in it.

Note: If the RichTextBox control is NOT the first control inside your TabPage, then you will need to replace the number [0] with the appropriate number. I.e. If the RTB is the second control in your tabpage then replace [0] with [1].

I hope this has helped.

Regards,
Jason Pezzimenti.


If you liked the answer that I have provided, then please click the 'Good Answer' link on the bottom-right of this post. Thank you.

GeneralRe: using tab control Pin
Luc Pattyn31-Jul-09 18:28
sitebuilderLuc Pattyn31-Jul-09 18:28 
QuestionTextBox disabling Middle-Scroll. Pin
Baeltazor31-Jul-09 6:58
Baeltazor31-Jul-09 6:58 
AnswerRe: TextBox disabling Middle-Scroll. Pin
Xmen Real 31-Jul-09 7:01
professional Xmen Real 31-Jul-09 7:01 
GeneralRe: TextBox disabling Middle-Scroll. Pin
Baeltazor31-Jul-09 7:07
Baeltazor31-Jul-09 7:07 
GeneralRe: TextBox disabling Middle-Scroll. Pin
Xmen Real 31-Jul-09 7:09
professional Xmen Real 31-Jul-09 7:09 
GeneralRe: TextBox disabling Middle-Scroll. Pin
Baeltazor31-Jul-09 7:10
Baeltazor31-Jul-09 7:10 
GeneralRe: TextBox disabling Middle-Scroll. Pin
Xmen Real 31-Jul-09 7:16
professional Xmen Real 31-Jul-09 7:16 
GeneralRe: TextBox disabling Middle-Scroll. Pin
Baeltazor31-Jul-09 7:21
Baeltazor31-Jul-09 7:21 
QuestionYDreams ImageMapDemo 2.0 Code Behind Issue Pin
dmgroup198431-Jul-09 6:47
dmgroup198431-Jul-09 6:47 
AnswerRe: YDreams ImageMapDemo 2.0 Code Behind Issue Pin
Henry Minute31-Jul-09 9:28
Henry Minute31-Jul-09 9:28 
GeneralRe: YDreams ImageMapDemo 2.0 Code Behind Issue Pin
dmgroup198431-Jul-09 11:38
dmgroup198431-Jul-09 11:38 
QuestionChanging the text colour (foreColor) of a DateTimePicker? Pin
MWRivera31-Jul-09 6:44
MWRivera31-Jul-09 6:44 
QuestionRe: Changing the text colour (foreColor) of a DateTimePicker? Pin
Ruben Herman27-Aug-10 23:24
Ruben Herman27-Aug-10 23:24 
QuestionChanging the colour of the inside of a checkbox? Pin
MWRivera31-Jul-09 6:34
MWRivera31-Jul-09 6:34 
AnswerRe: Changing the colour of the inside of a checkbox? Pin
Xmen Real 31-Jul-09 6:53
professional Xmen Real 31-Jul-09 6:53 
GeneralRe: Changing the colour of the inside of a checkbox? Pin
MWRivera31-Jul-09 8:04
MWRivera31-Jul-09 8:04 
GeneralRe: Changing the colour of the inside of a checkbox? Pin
Xmen Real 31-Jul-09 8:21
professional Xmen Real 31-Jul-09 8:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.