Tvd
Tvd

Reputation: 4601

How to set borders of a custom textbox for PAssword type?

I have 2 text boxes with USername & PAssword. I got a class RoundedCornerTextbox from http://www.codeproject.com/KB/edit/RoundedCornerTextbox.aspx. It works well with username textbox. But with PAssword textbox it shows actual password instead of "*" - the password char of Textbox.

How can I handle this situation in the RoundedCornerTextbox class ? If I just set the text to "**" (* as many as size of text) in DrawString(), then when I retrieve pswdTxt.Text, the data received will be "*" only and not actual text.

Upvotes: 0

Views: 1024

Answers (1)

Renatas M.
Renatas M.

Reputation: 11820

Ok, if you want rounded corner text box, you can use free Krypton toolkit textbox component. It supports textbox border rounding. What you need is to set property:

int howMuchRoundCorners = 5;
kryptonTextBox.StateCommon.Border.Rounding = howMuchRoundCorners;

enter image description here

Upvotes: 1

Related Questions