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

  • Home
  • SEARCH
  • 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 222779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:09:33+00:00 2026-05-11T19:09:33+00:00

I am looking for a control (or suggestions on building my own) for a

  • 0

I am looking for a control (or suggestions on building my own) for a .NET 2.0 (windows) app that works like the address box in the Outlook mail window (bee below)

Outlook Address Control http://content.screencast.com/users/Ryan_Farley/folders/Jing/media/a511142b-dd04-4885-ad1e-f2582c201723/2009-03-12_2116.png

The control basically works where each e-mail address is like an item in the text area. I don’t care so much about letting the user also type into this area like you can in Outlook. I just want to be able to add these complete strings (e-mail addresses) to the text area, or list, and the user can select them (but not edit) and can delete or backspace through the list to delete entire items (e-mail addresses).

Anyone know of a control out there that does this? Any suggestions for building my own? (or anyone know what you even call this control so I know what to google?)

  • 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-11T19:09:33+00:00Added an answer on May 11, 2026 at 7:09 pm

    Here’s some code to get you started.

    using System.Text;
    using System.Windows.Forms;
    using System;
    
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
                textBox1.Text = "mail@mail.com; mail2@mail.com; mail3@mail.com";
            }
    
            private void textBox1_Click(object sender, EventArgs e)
            {
                int nextSpaceIndex = textBox1.Text.Substring(textBox1.SelectionStart).IndexOf(' ');
                int firstSpaceIndex = textBox1.Text.Substring(0, textBox1.SelectionStart).LastIndexOf(' ');
                nextSpaceIndex = nextSpaceIndex == -1 ? textBox1.Text.Length : nextSpaceIndex + textBox1.SelectionStart;
                firstSpaceIndex = firstSpaceIndex == -1 ? 0 : firstSpaceIndex;
                textBox1.SelectionStart = firstSpaceIndex;
                textBox1.SelectionLength = nextSpaceIndex - firstSpaceIndex;
            }
        }
    }
    

    This will, when you click on an email address, select the entire email address. I’m not sure if this is the functionality you’re going for (it sounds like it is, though), but it’ll get you started. If you want to do other things beyond having click functionality, hook into the other events offered by TextBox.

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

Sidebar

Related Questions

I'm looking for a docking control library for C# WinForms that works in NET
Im looking to create a control that would look like comic baloon. In WPF
My partner and I are building a web app and I'm looking for suggestions
I'm looking for a calendar control ( AKA date-picker) that works on mobile devices.
Looking for a control that allows to select one text value at a time
Im looking for a control like the DataForm which is new in Silverlight 3
I'm looking for a control that allows me to choose a single option from
Looking for a custom ASP .NET control were the InnerHTML of a DIV is
In looking at Fuzzy Date Time Picker Control in C# .NET? Piotr Czaapla's answer
I'm new to the WinForms control toolbox, so I'm looking to get suggestions on

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.