How do I remove this flashing beam from the textbox? I've tried all the options in the Properties tab and I can't seem to disable it.
Asked
Active
Viewed 247 times
1
-
Have you considered using a label instead? – Ian Sep 28 '18 at 23:33
-
@Ian I guess, but I want the output box to be visible. Is there a way to do so using a label? – Emily K Sep 28 '18 at 23:34
-
Don't think so. What about setting the textbox to read-only? – Ian Sep 28 '18 at 23:34
-
The "beam" is a text cursor. You may want to turn it off. It shows where text should be typed. – Thomas Matthews Sep 28 '18 at 23:34
-
@Ian I edited my post and added a Properties Photo. You can see my properties there. The textbox is currently set to read-only, but it's still showing up. – Emily K Sep 28 '18 at 23:40
-
The cursor is there because the control has the focus. How about setting the focus to another control, maybe when the form is displayed? – Ian Sep 28 '18 at 23:43
-
1There is this way, if it's Managed C++: [C-cli textbox hidecaret hide blinking cursor](https://stackoverflow.com/questions/27803394/c-cli-textbox-hidecaret-hide-blinking-cursor) – Ian Sep 28 '18 at 23:48
-
1and if it's not, there's this: [C Win32 hide disable caret from an edit box](https://stackoverflow.com/questions/19849201/c-win32-hide-disable-caret-from-an-edit-box) – Ian Sep 28 '18 at 23:55
-
1That *beam* is called a *text caret*. It tells the user where the edit focus is located. If you don't want the text to be editable, don't use a textbox - a textbox is a single line **edit control**, which means it's used for editing text. If you want to display something that is not able to be edited, use a label, which is specifically designed for that purpose. A textbox tells the user 'use this to edit or add text*. Don't hand out a hammer when the proper tool for the job is a pair of pliers. IOW, use the right tool for the job. – Ken White Sep 28 '18 at 23:56
-
@KenWhite, do you have any other suggestions on what could give the same look (output text area with a boundary), however, doesn't display the text caret? – Emily K Sep 29 '18 at 00:03
-
Even if you can't edit the text (read-only edit box), you still need the caret for *selecting* text. That's why it's so hard to get rid of. A control to display text without selecting it is a `STATIC` control. – Mark Ransom Sep 29 '18 at 02:32
-
P.S. the easiest way to eliminate the caret is to put focus on a different control. You can control this with the tab order of the window. – Mark Ransom Sep 29 '18 at 02:34