Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Nov 12, 2019 9:20 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Selecting text in GotFocus event on Windows.
PostPosted: Mon Mar 07, 2011 12:03 pm 
Offline

Joined: Sat Oct 01, 2005 4:13 pm
Posts: 58
Location: Surrey, BC, CANADA
I am becoming frustrated with the differences between Windows and Mac once more.

I have some numeric TextFields. When I tab into them, the text is automatically selected. I wish to do the same when the user clicks on the TextFields so I added the following text to the Got Focus event:

Me.SelStart = 0
Me.SelLength = Len(Me.Text)

This works fine on Mac OS but doesn't on Windows XP. I am running in 2010r4.1 on both machines.

Anyone have any Idea why this code isn't working on the Bill Gates OS?

Terry

_________________
Terry Ford


Top
 Profile  
Reply with quote  
 Post subject: Re: Selecting text in GotFocus event on Windows.
PostPosted: Mon Mar 07, 2011 1:45 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Me.SelectAll()

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Selecting text in GotFocus event on Windows.
PostPosted: Mon Mar 07, 2011 7:30 pm 
Offline

Joined: Sat Oct 01, 2005 4:13 pm
Posts: 58
Location: Surrey, BC, CANADA
charonn0 wrote:
Me.SelectAll()


That doesn't work either. The method probably has my original code anyway.

_________________
Terry Ford


Top
 Profile  
Reply with quote  
 Post subject: Re: Selecting text in GotFocus event on Windows.
PostPosted: Mon Mar 07, 2011 7:49 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
I don't have my original report handy, but I reported an issue like this and found that if the field didn't have the focus the selection highlight didn't draw. I felt that this was a bug, not to mention a change in behavior, and I was told that was a "Windows issue' and the report was closed.

Dunno if that's the same issue you're seeing or if it's a completely new bug.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group