473,511 Members | 15,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

putting info into richtextbox

13 New Member
hi can anyone tell me how to combine info from 2 different textbox into 1 richtextbox and that the info are on the same line instead on a new line.
e.g.
textbox1=abcdefg
textbox2=1234567

so i want richtextbox to display abcdefg1234567 instead of

abcdefg
1234567

pls help...
Oct 4 '07 #1
7 1366
Killer42
8,435 Recognized Expert Expert
Do you know how to concatenate two strings? This is very beginner-level stuff.
Oct 4 '07 #2
jamesd0142
469 Contributor
Ritchtextbox.text = textbox1.text + textbox2.text
Oct 4 '07 #3
ck123456
13 New Member
im new to visual basic so im not sure..is it put & ?
Oct 4 '07 #4
ck123456
13 New Member
hi thx for the code..but i tried putting + but it still give me
abcdefg
1234567
Oct 4 '07 #5
Killer42
8,435 Recognized Expert Expert
hi thx for the code..but i tried putting + but it still give me
abcdefg
1234567
Either & or + will work. If you are getting a line break, then the line break must be in one of the textboxes.
Oct 4 '07 #6
ck123456
13 New Member
Thanks guys for the help!!
i got another problem..im hoping to color the text in richtextbox so if it is alpha it will color blue and if it is number it will color black..can this be done in 1 richtextbox??
Oct 4 '07 #7
Killer42
8,435 Recognized Expert Expert
Thanks guys for the help!!
i got another problem..im hoping to color the text in richtextbox so if it is alpha it will color blue and if it is number it will color black..can this be done in 1 richtextbox??
Sure. Just properties like SelStart and SelLength to select the text, then set properties such as SelColor. Note this is just off the top of my head - I may have the names wrong. Do some browsing through the properties, and/or the doco.

There are other ways to select text in a RTB, such as selecting by words, or to the next occurrence of a specified character. Look through the doco, it's a pretty powerful control.
Oct 5 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3213
by: nouno | last post by:
I am trying to spell check a richtextbox. Through code (shown below) I save the contents of the richtextbox to a rtf file, open the rtf file in Word, spell check it, save it, and then load the ftf...
3
21062
by: kangoo | last post by:
Hi, I'm trying to remove the last charater in a richTextBox. I though richTextBox.Text.Remove(richTextBox.Text.length-1, 1); would work, but it does nothing (eg richTextBox.Text += "some new...
12
2146
by: M O J O | last post by:
Hi, If I inside a thread creates a RichTextBox and only use this inside the thread, will there be any thread problems? I need to convert between Text and RTF inside a thread. Thanks!! M...
2
17268
by: JonnyT | last post by:
I searched high and low for an answer on how to auto scroll a richtextbox and now I finally have it. Since it took me a while to get a good efficient way of doing it that didn't require focus to...
0
11122
by: Vincent | last post by:
Dear all, I have implemented a class to export the content of RichTextBox to image in WYSISYG mode so that line breaks on the screen are the same as exported. C# Code: public struct...
9
4841
by: James Wong | last post by:
Hi, I use the RichTextBox in my program. It will use different language in this RichTextBox (chinese and english characters), and it set the "DualFont" and use different fonts. By the way, how...
3
7154
by: michael sorens | last post by:
The documentation for the RichTextBox is sketchy at best. I want to do a very simple task but I cannot find information on this. I am using a RichTextBox as an output window. Some text I want to...
0
2028
by: Vimalathithan | last post by:
I just developing a editor. I have provide the options like Bold, Italic, underlin, font change, font size change. These font options are keep in with one toolstripbutton. the toolstripbar keep...
1
1695
by: bmerlover | last post by:
I'm having trouble reading quotations inside the richTextBox when a file is opened on to it. I've tried a couple different methods, most of them didn't compile. I came across one that does compile...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.