Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7515305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:45:59+00:00 2026-05-30T00:45:59+00:00

I have few TabPages and each contains rich text box. How can I access

  • 0

I have few TabPages and each contains rich text box. How can I access richtechbox on a selected tab?

TabPage selectedTab = tabControl.SelectedTab;
RichTextBox selectedRtb = selectedTab.Controls.Find("rtb", true).First() as RichTextBox;

This is what I have tried but no luck.

Added:

This is how tabpage is added with richtextbox control

TabPage newTab = new TabPage(name);
RichTextBox rtb = new RichTextBox();
rtb.Dock = DockStyle.Fill;
rtb.BorderStyle = BorderStyle.None;
rtb.Text = file.Data;
newTab.Controls.Add(rtb);
tabControl.TabPages.Add(newTab);
tabControl.SelectedTab = newTab;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T00:46:00+00:00Added an answer on May 30, 2026 at 12:46 am

    If this is WinForms, it would just be:

    if (selectedTab.Controls.ContainsKey("rtb"))
      RichTextBox selectedRtb = (RichTextBox)selectedTab.Controls["rtb"];
    

    if rtb is the name of the RichTextBox control.

    When creating your control, add the name to it:

    RichTextBox rtb = new RichTextBox();
    rtb.Name = "rtb";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have few text fields like SSN , phone number and email id. I
I have few doubts regarding transparent AlertDialog box in android.I have created the alert
We have few very big tables (3 tables, each 2 ~ 5 GB) in
I have few tabs like Photo,Story,Graphics inside XamDockManager.I need to select a tab on
I have few text files that has some key words. I have to select
I have few arrays of integers. Elements in each array are ordered. Arrays does
I have few divs set next to each other making a horizontal scrolling page.
I have few thousand of items. For each item I need to download a
I have few form fields, each input and label is wrapped inside a div
I have few div box that looks like this, they all are like productholder2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.