One line of code in the got focus event is all it takes.
Xojo.Core.Timer.CallLater(1,AddressOf Me.SelectAll)
One line of code in the got focus event is all it takes.
Xojo.Core.Timer.CallLater(1,AddressOf Me.SelectAll)
Thanks Markus. I lost the point of this thread. So, yeah, Timer.CallLater seems like a good solution.
[quote=337532:@Tim Hare]Why not selectall in GotFocus instead? That way
It doesn’t matter how you get to the field - mouse click, tab, etc.[/quote]
Tim, I tried that a few months back but it does NOT work with 2016R3 WIN7 - It ABSOLUTELY SHOULD!, but unfortunately it doesn’t. I decided to forget about it and move on. Now I’ve come back to it. It’s like a small splinter in the back of my mind, I can live with it, but annoying nonetheless.
[quote=337534:@Neil Burkholder]One line of code in the got focus event is all it takes.
Xojo.Core.Timer.CallLater(1,AddressOf Me.SelectAll)
[/quote]
Neil, that is even simpler and it works perfectly. No need for the MouseUp event.
My guess is that the 1 millisecond delay somehow forces another run through the loop where now the events align as they should?