Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Forms Adding Text without Textbox

I am using Visual Studio 2019 in order to create a Windows Form Application. I need some titles in my application, which means these strings will not be modified by the user.

For now, I created textboxes for these titles and made these textboxes "read-only". However, this does not satisfy my aesthetical expectations.

Therefore, I wonder if there is a way to add a string without adding a textbox, to the form. Is there a way?

Thanks in advance :)

like image 789
Anıl Burak Gökce Avatar asked Jun 28 '26 12:06

Anıl Burak Gökce


1 Answers

Consider using a Label control rather than a TextBox.

The only time I would use a TextBox as a label is if I want the user to be able to copy the info, and I make it borderless, readonly and have the same colour as the background of the form. It's not superb UX though as there isn't anything that screams "you can highlight and copy this text" other than an I beam cursor, which is pretty much "mystery meat navigation" - better off putting a copy button next to it if you expect the user to copy info often

like image 170
Caius Jard Avatar answered Jun 30 '26 01:06

Caius Jard