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

Visible lines in richtextbox control

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 lines being displayed (assuming first line to be 1)
is 10 to 19. How do I find this out programmatically?

Thanks!
Nov 20 '05 #1
4 3804
Hi,

Trace.WriteLine(RichTextBox2.Lines.GetUpperBound(0 ) + 1)

Ken

----------------

"Juan Romero" <ju*********@bowne.com> wrote in message
news:OQ*************@tk2msftngp13.phx.gbl...
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 lines being displayed (assuming first line to be 1) is 10 to 19. How do I find this out programmatically?

Thanks!

Nov 20 '05 #2
Hi,

Trace.WriteLine(RichTextBox2.Lines.GetUpperBound(0 ) + 1)

Ken

----------------

"Juan Romero" <ju*********@bowne.com> wrote in message
news:OQ*************@tk2msftngp13.phx.gbl...
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 lines being displayed (assuming first line to be 1) is 10 to 19. How do I find this out programmatically?

Thanks!

Nov 20 '05 #3
Ken,
thanks for replying.

GetUpperBound will get me the size of the entire array of lines. What I
am looking for is the number of lines VISIBLE in the box.

Regards,
Juan Romero
(To e-mail me remove the underscores from my e-mail address.)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4
Ken,
thanks for replying.

GetUpperBound will get me the size of the entire array of lines. What I
am looking for is the number of lines VISIBLE in the box.

Regards,
Juan Romero
(To e-mail me remove the underscores from my e-mail address.)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5

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

Similar topics

1
by: Thomas Kehl | last post by:
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...
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...
8
by: Hansen | last post by:
Hi I have a form with multiple labels and textboxes and listboxes that need to be made visible and not visible when buttons are clicked. Is there anyway of grouping them together so that I have...
3
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...
2
by: aemihal | last post by:
Hello, I have a RichTextBox that has a large number of lines, well in excess of the amount that can be seen without scrolling. Upon an event, such as clicking a button, I would like to move the...
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...
0
by: randadotexas | last post by:
Hello, everybody. I have a form with a RichTextBox or a simple TextBox control. It contains hundreds of text lines, so control has to be scrolled. I want to send to a printer only the lines...
1
by: randadotexas | last post by:
Hello, everybody. I'm working on a Vb.net project. I have a form with a RichTextBox or a simple TextBox control. It contains hundreds of text lines, so the control has to be scrolled. I want...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.