[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Concat 5 RichTextBoxes

Posted on 2010-11-29
6
Medium Priority
?
265 Views
Last Modified: 2012-06-27
I have a form that has 5 RichTextboxes on it, that I would like to concatinate into a final main.RichTextBox  how can this be done?

so far I have the following that will not work

 main.SelectionStart = Len(main.Text)

        emailbody1.SelectionStart = Len(emailbody1.Text)

        emailbody2.SelectionStart = Len(emailbody2.Text)

        emailbody3.SelectionStart = Len(emailbody3.Text)

        emailbody4.SelectionStart = Len(emailbody4.Text)

        emailbody5.SelectionStart = Len(emailbody5.Text)

        main.SelectedRtf = emailbody1.Rtf &
                                       emailbody2.Rtf &
                                       emailbody3.Rtf &
                                       emailbody4.Rtf &
                                       emailbody5.Rtf
0
Comment
Question by:H-SC
  • 3
  • 2
6 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 34233903
Did your tryed like this:

main.Text= emailbody1.Text & emailbody2.Text & emailbody3.Text & emailbody4.Text & emailbody5.Text

(not tested!)

jppinto
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 2000 total points
ID: 34233952
main.SelectedRtf = emailbody1.Rtf
 main.SelectedRtf = emailbody2.Rtf
 main.SelectedRtf = emailbody3.Rtf
etc.
0
 
LVL 1

Author Comment

by:H-SC
ID: 34233982
jppinto,

That was the first thing that I coded assuming that it would work and compiled it that way, and it even works without any errors.  But it drops all of the
emailbody1, 2, 3, 4, 5 formatting when it populates my Main.RichTextBox
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:H-SC
ID: 34234038
Erick37,

wow!
you are getting all of my points today!

works perfect!

thank you
0
 
LVL 1

Author Comment

by:H-SC
ID: 34234088
Erick37,
One quick question...If I didn't need each on a new line, just back to back, can that be done??
0
 
LVL 32

Expert Comment

by:Erick37
ID: 34234263
main.SelectedRtf.Multiline = false

main.SelectedRtf = emailbody1.Rtf
 main.SelectedRtf = emailbody2.Rtf
 main.SelectedRtf = emailbody3.Rtf

main.SelectedRtf.Multiline = true
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question