Results 1 to 4 of 4

Thread: [RESOLVED] [2005 Express SP1] multi-line textbox

  1. #1

    Thread Starter
    Lively Member smart_phil_dude1's Avatar
    Join Date
    Jun 2005
    Location
    Behind You!
    Posts
    125

    Resolved [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
    Please Help Us Save Ana or donate now by going to Oneana.com

    Visit my Website at http://www.therealfantasy.com

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member smart_phil_dude1's Avatar
    Join Date
    Jun 2005
    Location
    Behind You!
    Posts
    125

    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.
    Please Help Us Save Ana or donate now by going to Oneana.com

    Visit my Website at http://www.therealfantasy.com

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005 Express SP1] multi-line textbox

    Quote 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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width