Click here to Skip to main content
15,911,142 members
Home / Discussions / C#
   

C#

 
GeneralRe: Delete a directory Pin
MicealG17-May-07 4:57
MicealG17-May-07 4:57 
GeneralRe: Delete a directory Pin
jayart17-May-07 5:12
jayart17-May-07 5:12 
GeneralRe: Delete a directory Pin
MicealG17-May-07 5:18
MicealG17-May-07 5:18 
GeneralRe: Delete a directory Pin
MicealG17-May-07 5:22
MicealG17-May-07 5:22 
AnswerRe: Delete a directory Pin
Jimmanuel17-May-07 5:18
Jimmanuel17-May-07 5:18 
Questionhow to connect to http servers/My website and download the files Pin
pashitech17-May-07 4:16
pashitech17-May-07 4:16 
AnswerRe: how to connect to http servers/My website and download the files Pin
led mike17-May-07 4:42
led mike17-May-07 4:42 
GeneralRe: how to connect to http servers/My website and download the files Pin
pashitech17-May-07 5:03
pashitech17-May-07 5:03 
GeneralRe: how to connect to http servers/My website and download the files Pin
led mike17-May-07 6:16
led mike17-May-07 6:16 
QuestionStringBuilder and ASCII. [modified] Pin
Russell Jones17-May-07 3:20
Russell Jones17-May-07 3:20 
AnswerRe: StringBuilder and ASCII. Pin
led mike17-May-07 4:54
led mike17-May-07 4:54 
GeneralRe: StringBuilder and ASCII. Pin
Russell Jones17-May-07 5:32
Russell Jones17-May-07 5:32 
QuestionNew in .NET 2.0 Pin
Blumen17-May-07 3:20
Blumen17-May-07 3:20 
AnswerRe: New in .NET 2.0 Pin
Christian Graus17-May-07 3:22
protectorChristian Graus17-May-07 3:22 
GeneralRe: New in .NET 2.0 Pin
Blumen17-May-07 3:27
Blumen17-May-07 3:27 
GeneralRe: New in .NET 2.0 Pin
Christian Graus17-May-07 3:30
protectorChristian Graus17-May-07 3:30 
GeneralRe: New in .NET 2.0 Pin
Judah Gabriel Himango17-May-07 5:18
sponsorJudah Gabriel Himango17-May-07 5:18 
AnswerRe: New in .NET 2.0 Pin
Russell Jones17-May-07 3:52
Russell Jones17-May-07 3:52 
AnswerRe: New in .NET 2.0 Pin
Nissim Salomon17-May-07 5:24
Nissim Salomon17-May-07 5:24 
Questionhow to get textbox control? Pin
newtocsharp17-May-07 3:14
newtocsharp17-May-07 3:14 
AnswerRe: how to get textbox control? Pin
Judah Gabriel Himango17-May-07 5:47
sponsorJudah Gabriel Himango17-May-07 5:47 
I'd just make a new class that derives from TabPage and has a property on it that exposes the text box:

public class TextBoxTab : TabPage
{
   public RichTextBox TheTextBox
   {
      return this.richTextBox1; // assuming there is a RichTextBox named richTextBox1 on this control.
   }
}


Then whenever you add tabs to your TabControl, only add TextBoxTabs:

tabControl1.TabPages.Add(new TextBoxTab());


Your application code would look like this:

// Read all the text from the file:
string text = File.ReadAllText(theFileName);

// Get the selected tab:
TextBoxTab selectedTab = tabControl1.SelectedTab as TextBoxTab;

// Set the text of the text box on the tab.
selectedTab.TheTextBox.Text = text;


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Funny Love
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


QuestionHelp needed to convert function to a generic function Pin
Jim Taylor17-May-07 3:11
Jim Taylor17-May-07 3:11 
AnswerRe: Help needed to convert function to a generic function Pin
Not Active17-May-07 4:12
mentorNot Active17-May-07 4:12 
GeneralRe: Help needed to convert function to a generic function Pin
Jim Taylor17-May-07 4:59
Jim Taylor17-May-07 4:59 
AnswerRe: Help needed to convert function to a generic function Pin
Judah Gabriel Himango17-May-07 5:11
sponsorJudah Gabriel Himango17-May-07 5:11 

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.