PC Review


Reply
Thread Tools Rate Thread

Autoselect textbox contet

 
 
Rafael Pivato
Guest
Posts: n/a
 
      10th Nov 2003
How can I autoselect a TextBox text when the user taps it ?

I tried handling the GotFocus event and using SelectAll function, but the
text selects and deselects...


---------
Rafael Pivato


 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      10th Nov 2003
Set a short one-shot timer in GotFocus event - something like 100-200 ms
would do. On timer event select all text.

"Rafael Pivato" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I autoselect a TextBox text when the user taps it ?
>
> I tried handling the GotFocus event and using SelectAll function, but the
> text selects and deselects...
>
>
> ---------
> Rafael Pivato
>
>



 
Reply With Quote
 
Ginny Caughey [MVP]
Guest
Posts: n/a
 
      10th Nov 2003
Rafael,

I was never able to get SelectAll to do what I wanted either, so I ended up
just setting the textbox Text = "" when it gets focus. That's not the same
thing, of course, but it works the same for my users.
--
Ginny Caughey
..Net Compact Framework MVP

"Rafael Pivato" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I autoselect a TextBox text when the user taps it ?
>
> I tried handling the GotFocus event and using SelectAll function, but the
> text selects and deselects...
>
>
> ---------
> Rafael Pivato
>
>



 
Reply With Quote
 
Rafael Pivato
Guest
Posts: n/a
 
      10th Nov 2003
Thanks Alex!



What coincidence!!! I recently tried id with a thread and invoke as a "last
try". Not to good.

Using the complete framework with a Windows Forms Application it would work
just by this way too?



"Alex Feinman [MVP]" <(E-Mail Removed)> escreveu na mensagem
news:eL4ht#(E-Mail Removed)...
> Set a short one-shot timer in GotFocus event - something like 100-200 ms
> would do. On timer event select all text.
>
> "Rafael Pivato" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > How can I autoselect a TextBox text when the user taps it ?
> >
> > I tried handling the GotFocus event and using SelectAll function, but

the
> > text selects and deselects...
> >
> >
> > ---------
> > Rafael Pivato
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autoselect text when tabbing into a textbox Jonathan Allen Microsoft C# .NET 1 19th Nov 2005 11:09 PM
Autoselect text when tabbing into a textbox Jonathan Allen Microsoft Dot NET Framework Forms 2 19th Nov 2005 11:02 PM
Autoselect text when tabbing into a textbox Jonathan Allen Microsoft VB .NET 2 19th Nov 2005 11:02 PM
Send page by email refreshes browser contet =?Utf-8?B?Q2FybG8gRm9saW5p?= Windows XP Internet Explorer 0 15th Nov 2004 01:54 PM
Autoselect in the Textbox Frank Rizzo Microsoft VB .NET 1 9th Oct 2003 09:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:51 PM.