473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Input with tabs from RichTextBox to string

YarrOfDoom
1,247 Expert 1GB
Hi I'm trying to get my input from a RichTextBox into a string, but the tabs in my input are left away. Is this a limitation of string, or am I doing something wrong? I'm trying to do this like this:
Expand|Select|Wrap|Line Numbers
  1. string = RichTextBox.text
Yarr Of Doom
Sep 30 '07 #1
4 1876
Hi I'm trying to get my input from a RichTextBox into a string, but the tabs in my input are left away. Is this a limitation of string, or am I doing something wrong? I'm trying to do this like this:
Expand|Select|Wrap|Line Numbers
  1. string = RichTextBox.text
Yarr Of Doom
Sounds like you want the tabs to remain in the string?

Is there an RTF property in VB6? I know there is one in VB.net.
This is what you should use when checking for tabs. I think the tab will be represented as a "/t" in the RTF value. Then you can simply find the location and insert it into the string returned from .text.

Give it a shot.
Oct 1 '07 #2
Killer42
8,435 Expert 8TB
I've just double-checked, and the .Text property does return tabs as expected. Why do you think there's a problem?

Of course, you're welcome to go digging through this garbage if you want to track down the "\tab" as suggested by VBPhilly...
Expand|Select|Wrap|Line Numbers
  1. {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
  2. \viewkind4\uc1\pard\lang3081\f0\fs17 dfg dsfigjkgjkg\tab jkfgjf\tab 
  3. \par }
Oct 1 '07 #3
QVeen72
1,445 Expert 1GB
Hi,

You have to use :

RichTextBox1.TextRTF

to get the RTF source..

Regards
Veena
Oct 1 '07 #4
YarrOfDoom
1,247 Expert 1GB
I've just double-checked, and the .Text property does return tabs as expected. Why do you think there's a problem?
You were right indeed, I had a bug in my code which caused my output to be wrong, and in debugging mode, tabs aren't always displayed right.

Yarr of Doom
Oct 1 '07 #5

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

Similar topics

3
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...
2
by: SamSpade | last post by:
I think I've determined that when setting a RichTextBox's Text property to a string that contains tabs, the tabs are ignored. Can anyone confirm or deny this?? Thanks in advance
1
by: Nathan Carroll | last post by:
In an mdi environment I constructed a child for with a richtextbox control that is used to load .rtf's. This works fine on the intiatial load of the form but when for is closed and reopened later...
1
by: Eric | last post by:
Using the 1.1 framework. We are using a newly created instance of a RichTextBox Class in our server code to manipulate RTF that is stored in the database. To clarify, we are not using or...
0
by: Matt | last post by:
This took way to long to figure out - now that I have it working I thought I would share with the group. I've seen tons of posts with very little good answers on this seemingly simple thing that...
0
by: Boni | last post by:
Dear all, my Richtextbox.text contains tabs and may be other special symbols (\r\n). I need to set a cursor on a position after a charachter number X. But Richtextbox.selectionstart=X don't do it,...
0
by: Paulers | last post by:
hello VB masters I have an issue that I am hoping you can help me with. I am creating an application that accepts user input via a richtextbox. the user can enter multiple entries and I need to...
1
by: mhmtzdmr | last post by:
Hi, I want to call a program and redirect the standart out to richtextbox control. I am using the procedure below. ...
1
by: Rasko | last post by:
when i try to insert kind of text to my richtextbox from web (copy/paste) i can do it but after i wanted to update i can't do it . there is an errormessage appears (Input string was not in a correct...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.