mjb3030 Posted November 4, 2003 Posted November 4, 2003 Which form event should I use to set my textbox selectionstart and selectionlength properties? I tried the load event and the paint event, but it didn't work there. I am assuming that is because the form hasn't finished loading at those points, and those changes can't be made yet. If I set them in the Designer Generated Code am I going to lose my form in the designer? Quote
Moderators Robby Posted November 4, 2003 Moderators Posted November 4, 2003 Try the event for the textbox itself the Enter event Quote Visit...Bassic Software
mjb3030 Posted November 4, 2003 Author Posted November 4, 2003 Never mind.... I just figured out that I can't do it in a form event because I am setting the selectionlength to the length of the text in the textbox. Since no text is in the textbox yet, it won't behave like I want. I guess it has to be done in a textbox event. Quote
Leaders dynamic_sysop Posted November 4, 2003 Leaders Posted November 4, 2003 what exactly do you want to set? the selectionstart to the end of some text thats loaded on Form_Load? or select some text on start up? Quote
mjb3030 Posted November 4, 2003 Author Posted November 4, 2003 Thanks :) I must have been replying at the same time. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.