Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Get cursor position in textbox?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2008, 12:55 PM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default Get cursor position in textbox?

How can I get the cursor position in a multiline textbox.
I want to programatically enter text at the cursor position

Thanks
Tony
Reply With Quote
  #2 (permalink)  
Old 08-07-2008, 01:33 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Textbox.SelectionStart sets and returns the cursor position in the string in the text box. Identifying the cursor as line number and position in line is not easily done.
Reply With Quote
  #3 (permalink)  
Old 08-07-2008, 02:47 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Maybe this thread will help you: http://www.basic4ppc.com/forum/open-...or-henshu.html
Reply With Quote
  #4 (permalink)  
Old 08-08-2008, 01:16 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Turns out its quit easy
Code:
  i = TextEdit.SelectionStart
 TextEdit.Text  = StrInsert(TextEdit.Text,i,
"[]")
 TextEdit.SelectionStart = i + 
1
 TextEdit.ScrollToCaret
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass Text into other application at current cursor position...? TWELVE Questions (Windows Mobile) 9 12-05-2008 10:52 AM
How can I get the position of cursor in then text box? fishworld2006 Questions (Windows Mobile) 4 08-20-2008 04:53 AM
Position TextBox or Button in centre of form burd27 Questions (Windows Mobile) 6 02-16-2008 05:12 AM
Not losing cursor position after running/compiling Woinowski Basic4ppc Wishlist 0 01-16-2008 07:18 AM
TextBox Cursor RandomCoder Questions (Windows Mobile) 4 07-02-2007 08:37 PM


All times are GMT. The time now is 10:13 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0