|
-
Jan 22nd, 2007, 08:52 PM
#1
Thread Starter
Lively Member
[RESOLVED] [2005 Express SP1] multi-line textbox
1. how can i get a specific line in a multi-line textbox (line number) to be read from the textbox?
example: Label1.Text displays all text on line 25 from TextBox1
2. i also wanted to know how can i make it read the amount of lines in a multi-line textbox
example: Label2.Text displays the amount of lines used in TextBox1
-
Jan 22nd, 2007, 09:13 PM
#2
Re: [2005 Express SP1] multi-line textbox
May I suggest, as I have many, many times in previous threads, that if you want to do something to or with a class the first thing you do is read the MSDN help topics for the class itself and its member listing. Doing so for the TextBox class would have led you to the Lines property, described thusly:
Gets or sets the lines of text in a text box control.
Following the link to the help topic for the property itself would reveal that it returns a string array, from which you can get an individual line or the total number of lines.
Despite what some would have you believe, using MSDN is not difficult, especially if you know what class you're dealing with to begin with. That way you can use the index instead of having to search.
-
Jan 22nd, 2007, 09:21 PM
#3
Thread Starter
Lively Member
Re: [2005 Express SP1] multi-line textbox
oh ok thanks a lot... having never used that website before i didn't know where to look.
-
Jan 22nd, 2007, 09:45 PM
#4
Re: [2005 Express SP1] multi-line textbox
 Originally Posted by smart_phil_dude1
oh ok thanks a lot... having never used that website before i didn't know where to look.
If at all possible you should have installed the MSDN Express Library locally and then you would have to use the Web site. The local version is even easier to use. You just type "textbox" into the index and it will bring up a list of relevant topics. Like I said, no searching required.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|