Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Get cursor position in textbox?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2008, 01:55 PM
Senior Member
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 123
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, 02:33 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,687
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
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, 03:47 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Maybe this thread will help you: Text Editor, Henshu
Reply With Quote
  #4 (permalink)  
Old 08-08-2008, 02:16 AM
Senior Member
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 123
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 On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 12:16 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0