Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2005

Tip: Looking for answers? Try searching our database.

Get cursor position in combobox?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Becker - 06 Jan 2005 16:16 GMT
I have a need to know in one of the keypress events, what position the
cursor is in.  For example, as I position the cursor and type, I'd like to
know for each key I press where in the string of text in the combobox I am.
I didn't see anyway to do this.

Thanks,
Becker
Bruce Wood - 11 Jan 2005 18:04 GMT
Look at ComboBox.SelectionStart and ComboBox.SelectionLength.

By the way, if you're trying to build an auto-completion combo box, the
kind in which the selection changes as the user types, search for
autocompletion and combo box in this news group. There are several
examples posted here.
Morten Wennevik - 16 Jan 2005 09:09 GMT
Hi Becker,

You may be able to do something with the SelectionStart property.
It should report the position of the last character entered.

Signature

Happy Coding!
Morten Wennevik [C# MVP]

Morten Wennevik - 16 Jan 2005 09:36 GMT
Heh?

Anyone know why this message shows up now when I posted it some time ago  
with no changes to the system time?

Signature

Happy Coding!
Morten Wennevik [C# MVP]


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.