Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Experts,

I want to such a textbox tagged with a icon.

Kindly guide me.


--- Anil Kumar
Posted

You can't. Not directly.
What you need to do is add a button to the right of the text box and associate an icon to the button.

Or you could migrate your code to WPF where you can use styles and templates to change the look and feel of any control.
 
Share this answer
 
Comments
RaviRanjanKr 29-May-11 12:58pm    
Using WPF is a Good Suggestion, My 5 :)
Abhinav S 29-May-11 13:34pm    
Thanks Ravi.
Go for extending the TextBox, you can paint the image to the left or right of the textBox in the paint event. You may have to handle the layout. Take a look at the custom controls category.

Vallarasu S.
 
Share this answer
 
Comments
Abhinav S 29-May-11 13:34pm    
Reasonable suggestion.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900