CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    2

    multiple text boxes and combo box selections output to txt file..

    Hello,

    I'm using Vb .net 2008

    I could use some advice/examples to acheive the following:

    I have 1 form, 4 text boxes, (textbox1 ,2, 3, 4)

    Textbox1 and Text box 3 and single line text boxes..
    Textbox2 is multiline.. (a description field which can be as long or short as the user desires..)

    Textbox 4 is a large multi-line textbox that will contain the output of Textbox1,2,3.

    I need to find out how to output the contents typed into Textbox1,2 and 3 into Textbox4 while maintaining formatting..

    For example, contents of Textbox1 should always be the first text displayed in textbox4,
    immediately under that should be the contents of Textbox2, and under that, Textbox3

    I want to ensure that the text is displayed in that order even if the user enters information into Textbox3 first..
    and still displayed in the proper order if Textbox2 has 1 line of text or 20 lines of text.


    How could I do this?
    How can I make the text from one box always be inserted before or After text from another specific textbox when its displayed in the destination Textbox.. (think of Textbox4 like a "preview window" of sorts.. which will later be outputted to an actual txt file.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: multiple text boxes and combo box selections output to txt file..

    You need to tell it WHEN to combine the fields, but you can use this:

    Code:
    Text4.Text = Text1.Text & Text2.Text & Text3.Text
    or even add Newline char's between them.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured