Is there any way to change all of the text inside a label to another character? It would still be the same length, but all of the text within the label would be the new character.
schroaus
8
Junior Poster in Training
Recommended Answers
Jump to PostIf you mean like changing "My Label" to "xxxxxxxx" then you could try
lblLabel.Text = Space(lblLabel.Text.Length).Replace(" ", "x")
Space(lblLabel.Text.Length)
generates a string of blanks the same length as the label text andReplace(" ","x")
replaces all of the blanks with the desired character.
Jump to PostYou could use a readonly textbox then set the password character, by removing the border it looks just like a label.
All 7 Replies
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
tinstaafl
1,176
Posting Maven
schroaus
8
Junior Poster in Training
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
tinstaafl
1,176
Posting Maven
tinstaafl
1,176
Posting Maven
schroaus
8
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.