How can I forbid selection text by mouse in Editable Text?

  1. How to make sure that when changing the text in Editable Text, the cursor does not automatically move to the end of the line? For example, you click on a character in the middle of a line, delete, and the cursor runs to the end.

  2. How to remove the ability to select a line / part of a line by holding down the mouse button in Editable Text?

323523-1.gif

For example, you click on a character
in the middle of a line, delete, and
the cursor runs to the end.

Hm, it does not? Are you manually shifting focus? Any script in OnTextChanged?

Image from Gyazo

How to remove the ability to select a
line / part of a line by holding down
the mouse button in Editable Text?

I believe you’d need to set it to Not Hit-Testable as isReadOnly merely prevents inputting. Other than that, you could try wrapping the editable text with a user widget and passing Unhandled in onMouseDown - untested, though; could work.

1 Like
  1. Yeeeeees i have some code which is setting text by loope which is check every letter…

  2. I have some text marked by IsReadOnly and i can select it too.

Well, don’t do the thing that you do every letter or do it differently. And, as I said, isReadOnly will not work here.

Well, i tried to set it Not Hit-Testable but it also prevent inputting.
Can you show variant with unhandled?

C++ helps. Closed.

how did it help ?