Focus

Brainbox

Member
Licensed User
In V 6.80 "TextBox1.Focus" don't works for me in desktop mode (it works compiled on the device).

Tom
 

klaus

Expert
Licensed User
Longtime User
What is the problem ?

I tried following program and it works, on desktop and device.

There is one difference in the behaviour:
- on the desktop TextBox1.SelectionLength = text length, the whole text is highlighted
- on the device TextBox1.SelectionLength = 0, the text is not highlighted

Best regards.
 

Brainbox

Member
Licensed User
Hi Klaus,
What is the problem ?

I tried following program and it works, on desktop and device.

There is one difference in the behaviour:
- on the desktop TextBox1.SelectionLength = text length, the whole text is highlighted
- on the device TextBox1.SelectionLength = 0, the text is not highlighted

Thanks for your advise.
Your example works well on my desktop.
I think I have found another difference in the behaviour.
If you write:
Form1.Show
textbox1.Focus
it works on desktop and device.

If you write (like I have done):
textbox1.Focus
Form1.Show
then it works on device only.

Tom
 
Top