473,407 Members | 2,320 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,407 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 3815
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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
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,...
0
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...

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.