Control.Select Method
-
I'm working with text files right now and I'm confused about a certain method. In many code examples, I see that after people put a string in a text box, they usually follow it up with a statment like "textbox1.select(1,0)" What does this do? Why is it important? What do the parameters mean? The VB help didn't really help me out that much. :wtf: Thanks for all your help! The Jazz Master 6000 DJ Badknees Parma Grind Crew - www.geocities.com/parmagrindcrew
-
I'm working with text files right now and I'm confused about a certain method. In many code examples, I see that after people put a string in a text box, they usually follow it up with a statment like "textbox1.select(1,0)" What does this do? Why is it important? What do the parameters mean? The VB help didn't really help me out that much. :wtf: Thanks for all your help! The Jazz Master 6000 DJ Badknees Parma Grind Crew - www.geocities.com/parmagrindcrew
This allows you to select text inside the textbox. By Select I mean highlighted as you do with a mouse by clicking and dragging.
'Fill the text box with some chars
textbox1.Text = "ABCDEFGHIJ"'This line will highlight the first 3 characters
'in the text box
textbox1.Select(0,3)It is located in the help here: http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformstextboxbaseclassselecttopic1.asp?frame=true[^]
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall." George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things." Jörgen Sigvardsson wrote: If the physicists find a universal theory describing the laws of universe, I'm sure the asshole constant will be an integral part of that theory.