Windows Develop Bookmark and Share   
 index > Windows Forms General > Strings with bounded value in a textbox. (To recipient box in Outlook Mail)
 

Strings with bounded value in a textbox. (To recipient box in Outlook Mail)

Can you please help me to find a textbox control which support strings with bounded values; For example

Name1; Name2; Name3 (Content in the text box ) and each name is bounded with a value.

Something like To recipient box in Outlook Mail?



Anil Issac  Monday, July 30, 2007 5:06 AM

Hi, Anil Issac,

I don't think that you need extra control to build a "recipient box" liketextbox.

It is easy to achieve your goal with LinkLabel,

For example,

Code Snippet

private void Form1_Load(object sender, EventArgs e)

LinkLabel name = new LinkLabel();

Color.Black;

"Hello;World;";

"Hello");

"World");

new LinkLabelLinkClickedEventHandler(name1_LinkClicked);

void name1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)

MessageBox.Show(e.Link.LinkData.ToString());

It is not possible to bind compound data to a textbox.

Use HashTable or a NameValueCollection to store bound data.

and Use TextBox1.Text.Split(";"c)

Muthu Krishnan. R  Monday, July 30, 2007 6:58 AM

Hi, Anil Issac,

I don't think that you need extra control to build a "recipient box" liketextbox.

It is easy to achieve your goal with LinkLabel,

For example,

Code Snippet

private void Form1_Load(object sender, EventArgs e)

LinkLabel name = new LinkLabel();

Color.Black;

"Hello;World;";

"Hello");

"World");

new LinkLabelLinkClickedEventHandler(name1_LinkClicked);

void name1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)

MessageBox.Show(e.Link.LinkData.ToString());

You can use google to search for other answers

Custom Search

More Threads

• Font.FromLogFont(LOGFONT) resets my font attributes, why?
• Where should a Windows Service write it's data?
• How to bypass print dialog
• Mdi Parent closing children
• WaitCursor and the TextBox
• Showing form for the first time
• Print All data on a form
• Custom lists into a PropertyGrid dropdown
• Moving graphics on top of a photograph
• How to Hide/Show the node of the TreeView?