Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...