textbox Focus

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
balkanweb
Posts: 16
Joined: Wed Apr 01, 2009 7:14 am

textbox Focus

Post by balkanweb » Tue Aug 07, 2012 6:47 am

Have a "Search" textbox. after clicking a button i like to clear the search and set it to Focus (so i dont have to select by mouse).
The below clears the textbox but does not focus it. Any idea ??


$txtsearch.text=""
$txtSearch.Focus

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

textbox Focus

Post by davidc » Tue Aug 07, 2012 8:10 am

Focus is a method. Try the following: $txtSearch.Focus() David
David
SAPIEN Technologies, Inc.

User avatar
balkanweb
Posts: 16
Joined: Wed Apr 01, 2009 7:14 am

textbox Focus

Post by balkanweb » Wed Aug 08, 2012 7:28 am

worked.

Think the Intellisense should put the after i select the method or i'm asking too much :)