Windows Phone @ MoDaCo: Caret position in TextBox in C# - Windows Phone @ MoDaCo

Jump to content

Galaxy Nexus Review
We put the Galaxy Nexus and Ice Cream Sandwich through their paces.

Google Music Launch
Google bring Music out of beta and launch their music store.

MoDaCo Plus / Ad Free
Hate ads? Want cool stuff? Sign up for a MoDaCo Plus / MoDaCo Ad Free account with Online Kitchen access!

Close
Open
Close
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Caret position in TextBox in C#
-----


#1 User is offline   Petyas 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 14
  • Joined: 07-December 05
  • Devices:Motorola MPX 220

Posted 07 February 2006 - 08:57 AM

How is it possible to get a caret position (row,collumn or current char position in string) in textbox control. TextBox have a method Select(position, length), but how can i obtain current position? If isn't way in C#, exists some method what i can import from any DLL? I found only method GetCaretPosition from coredll.dll. This method returns x, y position of caret, but this method i cannot use, because every char has a different width. This i need for select, cut, copy and paste.

Any idea?

Thanks

0

Sponsored Links


#2 User is offline   GregBlast 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 25-March 09
  • Devices:/

Posted 25 March 2009 - 09:20 AM

It is "TextBox.SelectionStart". You can either get it and set it.

0


Sponsored Links

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2012. MoDaCo uses IntelliTxt technology. Privacy Policy / Contact Details.

Skin and Language

Sign in here


Sign in options
Log in with Facebook Log in with Twitter   Go to advanced login Register Now!