RichTextBox printing???
-
How to print the text from a richtextbox, but with the fonts it's written in it. For example in a RTB i have a part wich is BOLD and the rest is REGULAR. How to print it as it is, and not all the text in BOLD or REGULAR ???:confused::confused::confused: -- modified at 13:06 Sunday 12th March, 2006
-
How to print the text from a richtextbox, but with the fonts it's written in it. For example in a RTB i have a part wich is BOLD and the rest is REGULAR. How to print it as it is, and not all the text in BOLD or REGULAR ???:confused::confused::confused: -- modified at 13:06 Sunday 12th March, 2006
-
No use of that, i want to print it anywhere on the paper, and not only that... This example alows only to print the richtextbox text on a paper and nothing more... if you understand what i mean...
That article is an example so that you can modify it to your needs.
- To print anywhere on the page just change
rectToPrint
to the rectangle you need to print onto. - If again, I understand you correctly you want to be able to print onto Forms as well as the printer? To do this then just redefine the Print method to accept a Graphics object instead of PrintPageEventArgs, then draw using this graphics and not the printer graphics, you can then pass a form's graphics canvas and print the contents of the richtextbox onto that form.
Ed
- To print anywhere on the page just change
-
That article is an example so that you can modify it to your needs.
- To print anywhere on the page just change
rectToPrint
to the rectangle you need to print onto. - If again, I understand you correctly you want to be able to print onto Forms as well as the printer? To do this then just redefine the Print method to accept a Graphics object instead of PrintPageEventArgs, then draw using this graphics and not the printer graphics, you can then pass a form's graphics canvas and print the contents of the richtextbox onto that form.
Ed
- To print anywhere on the page just change
-
I cant change it, it's not public, and i can't make it public, so it is a variable but it's not variable...
-
nogola wrote:
so it is a variable but it's not variable...
:wtf: :confused: :omg: Just add it as a parameter in the method declaration, then when you call the function you specify the rectangle where you want to draw it. :| Ed