Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello... i want to know if it is posible to insert a page break for a richtextbox... or to set the size of the verticall scrollbar of a richtextbox..

thanks
Posted
Comments
Sandeep Mewara 12-May-11 1:35am    
Pagebreak - richtextbox? Elaborate.

1 solution

By default Page Break Functionality is not there but you can manage by your own with adding BlankLines.

Just convert height of your text box to number of lines (I think 1 line takes 10 Px, you can calculate it). Now based on number of lines for a text box add remaining blank lines to do a page break. (Say you added three lines and your text box require 10 lines so, you need to add 7 blank lines and then it shows new line area.)

I have not tried but it should work, by the way Word PageBreak presentation in RichText box is denoted by "\n\f\n". I mean you can write richtextbox1.Text = "Page1 - PageBreak \n\f\n Page2" which representa a page break in Word file.

Hope you should ride on it.


Regards
Rushi
 
Share this answer
 
Comments
Oluwsegun 5-Nov-17 6:45am    
Can you please explain how to implement this page break in my rich textbox or rich text file

richtextbox1.Text = "Page1 - PageBreak \n\f\n Page2"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900