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.
Jump to Post
If 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 and
Replace(" ","x")replaces all of the blanks with the desired character.
All 7 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.