473,383 Members | 1,868 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,383 software developers and data experts.

Lines in RichTextBox

Hi!

I have a RichTextBox. I set the Property RightMargin of this Box to a value,
that i will not show the horizontal scrollbar. Now, the RichTextBox Wrap the
Lines automatically.
Now I would like to pick the lines out of the RichTextBox in such a way, as
they are indicated on the screen. That is, automatic line pagings because
of the right edge are to result in also individual lines. Can someone give
me a tip, how I can make that?

Thanks
Thomas
Nov 15 '05 #1
1 3836
I'm not sure I quite understand your question, but
retrieving lines from the rtb control is easily done with
the "Lines" property. It returns all the lines (as shown
in the control) in a string array.

Example:
string[] myLines = richTextBox1.Lines;

-Fabricio
-----Original Message-----
Hi!

I have a RichTextBox. I set the Property RightMargin of this Box to a value,that i will not show the horizontal scrollbar. Now, the RichTextBox Wrap theLines automatically.
Now I would like to pick the lines out of the RichTextBox in such a way, asthey are indicated on the screen. That is, automatic line pagings becauseof the right edge are to result in also individual lines. Can someone giveme a tip, how I can make that?

Thanks
Thomas
.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JDeats | last post by:
Is it possible to use GDI+ to draw: lines, points, shapes, etc... inside a RichTextBox? It seems VS.NET does this with the code edit window (left margin code collapse/expand boxes)? Best, Jeremy
2
by: Thorsten moeller | last post by:
Hi, i have a Textbox and amethod adding lines to the Textbox. There are two kind lines, depending on a check to be valid or invalid. Is it possible to color the lines or the text in a textbox...
0
by: Du | last post by:
I tried to search google and the news group, nothing turned up. I used the following code, but some how it doesn't work rchtextbox.Lines = "hello"; rchtextbox is my RichTextBox thanks
1
by: Benny Raymond | last post by:
I have lines of data coming from a server being written to a RichTextBox... The problem is that if I let this program run for a long period of time there are hundreds of lines of text showing up in...
4
by: Juan Romero | last post by:
Hey guys, Does anyone know how to find out the visible lines in the richtextbox control? For example, let's say the control has 30 lines, but due to size it can only display 10. The current...
0
by: OmniTech via .NET 247 | last post by:
I am having trouble updating lines in a richtextbox. The rtb.lines.setvalue("text", linenumber) runs, but does not update the control in the form. The code follows... This apps automatically...
2
by: None | last post by:
How do i write lines with different colors in a textbox? I've tried using the forecolor property and it just takes the last color. eg. TextBox1.ForeColor = Color.Red TextBox1.Text = "test" & "...
3
by: kaushalgajjar | last post by:
Hi, I am into a trouble since 1 week and unable to find the solution from any community or site. I have created a small program that i want to print along with horizontal lines (like a notebook...
3
by: booyeeka | last post by:
on a windows form, i have RichTextBox, with some text, in several lines. and one button on a form. i wolud like when i click on that button, to join all richtextbox of lines in one line, but not...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?

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.