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 8126001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:00:30+00:00 2026-06-06T07:00:30+00:00

I have a lot of textboxes. I have a button that will cut the

  • 0

I have a lot of textboxes. I have a button that will cut the selected text of the Focused textbox. How do i do that? I have tried this:

        if (((TextBox)(pictureBox1.Controls[0])).SelectionLength > 0)
        {
            ((TextBox)(pictureBox1.Controls[0])).Cut();
        }
  • 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-06-06T07:00:32+00:00Added an answer on June 6, 2026 at 7:00 am

    Loop through the controls to find the one with selected text:

    foreach (Control x in this.PictureBox1.Controls)
    {
        if (x is TextBox)
        {
            if (((TextBox)x).SelectionLength > 0)
            {
                ((TextBox)(x).Cut(); // Or some other method to get the text.
            }
        }
    }
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a panel and a button that adds text boxes to the panel
I have a simple form that contains a lot of duplicate textboxes. I have
We have a lot of controls that consist of: A container with rounded borders
I have a dirctory like this C:/Documents and Settings/Admin/Desktop/test/ that contain a lot of
I have a website which has a lot of combo boxes and auto-complete textboxes
I have lot of code in my Tornado app which looks like this: @tornado.web.asynchronous
We have lot of object with this kind of design : Interface and several
I have a problem with a master page containing a asp:textbox that I'm trying
I have a button on a XAML form that calls the btnName_Click() code in
Hi I have the following html: <p> <input type=text name=field1/> <input type=hidden name=fieldh1/> <button

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.