Results 1 to 7 of 7

Thread: [RESOLVED] from buttons to textbox

Hybrid View

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

    Re: from buttons to textbox

    If you set the Text of a TextBox to 1, it will display 1, right? Now, if you set the Text to 2, what would you expect it to display? The TextBox always displays the contents of its Text property, so it will display 2. If you want to join the existing text with some new text, that's exactly what you have to do: get the current Text, join the new text to it and then assign that combined result to the Text property, which then gets displayed.

    Even better, the TextBox class even has a method specifically to append text. It's named AppendText. I know you are a beginner but, regardless, you should ALWAYS read the documentation. You're using a TextBox. Read the documentation for the TextBox class. Looking down the list of members, you'd soon come across the AppendText method, described thusly:
    Appends text to the current text of a text box.
    Beginner or not, it should be fairly clear that that does exactly what you want.

    If you don't find what you want in the documentation then haven't really lost anything, other than a few minutes looking. If you do find it then it's a win, and you may find other useful information besides.
    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

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2011
    Location
    wv
    Posts
    21

    Re: from buttons to textbox

    it has a lot to do with information overload. i got a 1400 page book from the library, and of course the internet, to search through. i figured out basically what to do, just couldn't find an example for syntax. thanx so much for providing the light to the path, i was wandering in the dark. if it had been basic and not visual basic, i think i still have a calculator program that ran on a ti 99-4a saved on a tape drive(i guess that's dating myself as ancient).

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

    Re: from buttons to textbox

    Quote Originally Posted by sfzombie13 View Post
    it has a lot to do with information overload.
    That's exactly why I say (many times, if you care to check some of my older posts) to always read the documentation first. There's sifting or searching. If you know what type and/or member you are using, go straight to the documentation for that type and/or member and read. If you find what you need, as you would in this instance, there's no need to look any further, so you won't get overloaded.
    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

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jan 2011
    Location
    wv
    Posts
    21

    Re: [RESOLVED] from buttons to textbox

    apparently i was a bit hasty in marking this thread resolved. i worked for about 2 hours last night and couldn't make use of the append text command. in the book it says that it's used to append text to a file, not a text box. maybe i'm missing something, and what the hell happened to the other reply to this thread? i saw it briefly, and it had an email to me that it was posted, but when i came back to the thread, it wasn't there.
    i'm gonna try to muddle my way through this and i will solve the problem. i guess i'm gonna have to read the code i downloaded line by line.

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