Link to home
Start Free TrialLog in
Avatar of MM070398
MM070398

asked on

RichText Font Change



Want to change font size for whole text in a RichTextBox

RichText.Filename=Name$ ' inputs text
' font size =10

RichText.SelLength=len(RichText.TextRTF) ' highlights all
RichText.Font.Size =12
RichText.SelLength=0

changes font size only up to the position where an attribute
like Underline or Bold is loacted within RTFtext,
how can this be fixed ?
Avatar of jbil
jbil

RichText.SelFontSize = 12

instead of

RichText.Font.Size =12


ASKER CERTIFIED SOLUTION
Avatar of Matti
Matti
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi!

I think this problem a litle moore
and what if it is not the font is not the first matter in here.

Someting extra comes to my mind if you try to use clipboard data e.g Word 97 / 2000 documet. Then there is bossible that some format options like division into paragraphs e.g and that might need a filter control.

Another rtf box will do this.

Bring the documet to this second unvisible rtf box, and move it to other rtf box as text.

RichTextBox1.Text = RichTextBox2.Text

This will remove those special format options and the font conversion might get solved successful.

Matti
Avatar of MM070398

ASKER

RichText.SelFontSize = 12

instead of

RichText.Font.Size =12

from jbil works also