|
-
Oct 22nd, 2002, 11:00 PM
#1
Get the Location of the caret?
How can I get the location (x,y) of the caret (not the cursor) in a textbox? Any Ideas?
I am trying to show a "floating" listbox like the intellsense does in a textbox and I can't figure a good way to determine height. I could measure it with the length of the text but if some of the text is not in the visible window then it gets too low.
-
Oct 22nd, 2002, 11:31 PM
#2
PowerPoster
Have no idea if this will help you out:
http://www.microbion.co.uk/developer...p/textpos2.htm
I'll keep looking.
-
Oct 22nd, 2002, 11:40 PM
#3
PowerPoster
I think in the User32.lib there is a GetCaretPos API call you can make.
Try this link:
http://search.microsoft.com/default....&siteid=us/dev
-
Oct 23rd, 2002, 12:14 AM
#4
Well I had seen the article that the first link is an addendum to, but that one is better because it mentions a GetPositionFromCharIndex function in .NET but its only for RichTextBoxes. So I switched it to a RichTextBox and it works good, thanks. The other one was only for Windows CE.
Thanks a lot I thought this was going to be harder than that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|