disregard keypress in textbox xojo

Hi guys!

I noticed that make the textbox disabled make the control blur.
Somehow, I just want the text box stays on his properties but disabling the user to change its value.

how to disregard keypress in textbox ?

in KEYDOWN ACTION … return TRUE

Im sorry, correction: its Webtexfield.

there is no KEYDOWN event .

Please help

WebTextField1.ReadOnly = True

Webtextfield readonly = true becomes blur.

Make it a label with a white background.

But that’s ok. The user must know that the text field cannot be manipulated. If the background is white he will click and click and click and wonder why he can’t change the value.

There is a way in JavaScript to inhibit the keyboard, so effectively do what you ask. But as Eli rightfully objected, if the TextField does not look disabled and still shows the i-beam cursor, the user will think your app is stuck, and chances are he will just move away from the app. Statistics show on average it takes 2 seconds for a user to move to another site in such case.

If you are lucky, you will get people telling you the site is down.

You should stick to conventions and use ReadOnly.