Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I've got several RichTextBoxes, that I've given the capability of changing the font (through the fontdialog), which works fine, however, when I try to print it, I can't get the font changes to print correctly.....

 

'Setting the bounds to print

Dim drawtext As New RectangleF(80, ypos, 700, 800)

 

'Setting the font from the RTB (named t2)

Dim textfont As Font

textfont = New Font(t2.Font.Name, t2.Font.Height, t2.Font.Style)

'Printing string

e.Graphics.DrawString(t2.Text, textfont, Brushes.Black, drawtext)

 

There has got to be an easier way. Please help.

Thanks

Posted

We've had the same problem.

We only succeeded after we had found some Code on a Web-Page and altered al little to suit our purposes. If I find the Code I will mail it to you.

 

As far as I remember we had to build a Class parsing the rtf-String, but I don't really remember.

 

Will send you a message (either the Code or a dll with this special rtf-Box and its printing-Class), asap

 

Voca

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...