Need a control which immitate Outlook Email address display area
-
Monday, July 30, 2012 6:38 PMI need a control / code in VB.NET which immitate exactly as the control used to display From, To, CC fields in outlook. It should have the resize capability as in outlook control (Vscrollbar will dispaly if the line is more that 4, resize contents when u resize window, and Hscrollbar is not displaying at any condition). Please help me on this.
- Edited by Munna Deom Wednesday, August 01, 2012 4:07 AM
All Replies
-
Thursday, August 02, 2012 8:57 AMModerator
Hi Munna,
Winform doesn't contains such build in control, but I think you can create a custom control by using TableLayoutPanel control and TextBox Control.
You can control the the scroll bar in TextChanged event handler by check the TextBoxBase.Lines.Length Property. By setting the TableLayoutPanel and TextBox's dock property to fill, the TextBox will auto size according to the Form size.
Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Bob Wu-MTMicrosoft Contingent Staff, Moderator Thursday, August 09, 2012 7:19 AM
- Unmarked As Answer by Munna Deom Thursday, August 09, 2012 1:28 PM
-
Friday, August 03, 2012 6:41 PM
Hi,
Thank you for the reply. I think I cannot use textbox for my requirement since I need tooltip to be displayed for each text (These text will be email address seperated with ';' and only the display name of email address will be shown in the textbox. When a user place mouse over the text, it should display full email address as tooltip; the same way it looks in outlook). Please help me.
- Edited by Munna Deom Saturday, August 04, 2012 6:58 PM
- Edited by Munna Deom Saturday, August 04, 2012 6:59 PM
-
Monday, August 06, 2012 8:51 AMModerator
These text will be email address seperated with ';' and only the display name of email address will be shown in the textbox. When a user place mouse over the text, it should display full email address as tooltip; the same way it looks in outlook
You can validating the Text in the TextBox.validating event handler, check if the substring is a email address listed in the contact. If it is, then display the name instead of the full email address. You can display the tooltip with different location and different text according to the mouse location, see http://social.msdn.microsoft.com/Forums/en-NZ/winformsdatacontrols/thread/ec4f75df-0261-4be7-a8ab-e1f8b8ad6a4f.
I think a custom user control is the only way to do this since there is no such build-in or third party control as far as I know.
Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us


