Coding Thread, how to set cursor in textbox in Coding and Web Development; Hi,
Im strugling with an old hat problem with multiline textboxes, im programming in VBA and i want to create ...
16th April 2010, 09:47 AM #1
how to set cursor in textbox
Im strugling with an old hat problem with multiline textboxes, im programming in VBA and i want to create an emulated console for doing script like querying, however ive tried:-
text1.text=text1.text & vbcrlf & ">"
but the damn cursor moves to the next line after the ">" eve though i havent made an extra carriage return, any ideas why this is happening?
16th April 2010, 10:52 AM #2
Have you tried text1.selstart=len(text1.text) - 1
16th April 2010, 10:55 AM #3
Yes Ive tried -1,-2 ,3 gives error, im not sure if somehow the textbox changes focus after the change of Vbcrlf. the cursor suddenly jumps and creates a CR when i haven't added one.
Originally Posted by AngryTechnician
16th April 2010, 11:43 AM #4
Ah damnit, i just realised the default enter key setting was set to create new line.
By jack0w in forum Windows
Last Post: 21st June 2011, 09:29 PM
By SJL_2010 in forum Windows 7
Last Post: 8th February 2010, 09:07 PM
By zag in forum Windows 7
Last Post: 9th September 2009, 10:00 AM
By park_bench in forum Windows
Last Post: 1st June 2009, 07:34 PM
By lgfl_it_guy in forum Classified Adverts
Last Post: 8th February 2009, 11:41 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)