New topic: Textarea Select All and Deselect
<http://forums.realsoftware.com/viewtopic.php?t=38010> Page 1 of 1 [ 6 posts ] Previous topic | Next topic Author Message eddy2099 Post subject: Textarea Select All and DeselectPosted: Wed Mar 09, 2011 2:44 am Joined: Sun Jan 23, 2011 11:59 am Posts: 58 I needed to copy all the contents of the textarea so I did this Code:textarea.SelectAll textarea.Copy textarea.SelText="" The selectall and copy works great. However I need to deselect the SelectAll text so I issued the textarea.SelText="" and everything disappear from the textbox. How do I go about deselecting the SelectAll ? I did a workaround by copying the entire text to a string and then pasting it back to the textarea after I am done with the copying which probably isn't the right way to do it. Is there a better way ? _________________ RealStudio 2010R5.1 â¡ Macbook Pro Mac OS X 10.6.6 http://www.completemagic.com Top pbart Post subject: Re: Textarea Select All and DeselectPosted: Wed Mar 09, 2011 3:23 am Joined: Sat Oct 10, 2009 6:40 am Posts: 234 Just a guess, but try TextArea1.Refresh _________________ Regards Paul Windows 7 32bit RB 2010 4.1 Top timhare Post subject: Re: Textarea Select All and DeselectPosted: Wed Mar 09, 2011 3:32 am Joined: Fri Jan 06, 2006 3:21 pm Posts: 9407 Location: Portland, OR USA TextArea1.SelLength = 0 Top eddy2099 Post subject: Re: Textarea Select All and DeselectPosted: Wed Mar 09, 2011 3:35 am Joined: Sun Jan 23, 2011 11:59 am Posts: 58 Thanks Paul. If I kept the TextArea.SelText ="" and added TextArea.Refresh after that, it still disappear Without the TextArea.SelText = "", it still shows the select box around the text. In the End, I went with Code:dim selectedtext as new clipboard selectedtext.text = textarea.text selectedtext.close It seems to do the trick. Thanks Tim. That did the trick too. _________________ RealStudio 2010R5.1 â¡ Macbook Pro Mac OS X 10.6.6 http://www.completemagic.com Top pbart Post subject: Re: Textarea Select All and DeselectPosted: Wed Mar 09, 2011 3:41 am Joined: Sat Oct 10, 2009 6:40 am Posts: 234 when you use TextArea.SelText ="" you are saying that you want the selected text to be "" so yes, you should leave that line out. _________________ Regards Paul Windows 7 32bit RB 2010 4.1 Top eddy2099 Post subject: Re: Textarea Select All and DeselectPosted: Wed Mar 09, 2011 4:19 am Joined: Sun Jan 23, 2011 11:59 am Posts: 58 Thanks. I was under the impression that Text and SelText are two different thing altogether. Guess I am wrong there. _________________ RealStudio 2010R5.1 â¡ Macbook Pro Mac OS X 10.6.6 http://www.completemagic.com Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 6 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
