Quantcast
Channel: TX Text Control Community
Viewing all articles
Browse latest Browse all 1022

[OPEN] ServerTextControl, for StringStreamType.RichTextFormat can't change font name or size

$
0
0
I'am doing this:

//Find text to replace
int Pos = stcDoc.Find(ToFind, 0, FindOptions.NoMessageBox);

// If no match return, else select it.
if (Pos < 0) return;
stcDoc.Select(Pos, ToFind.Length);

// Get Font name and size.
string fName = stcDoc.Selection.FontName;
int fSize = stcDoc.Selection.FontSize;

// Replace selection (text found) with string containg Rich Text.
stcDoc.Selection.Load(rtfText, StringStreamType.RichTextFormat);

// Asign foun text Font name and size to replaced content.
stcDoc.Selection.FontName = fName;
stcDoc.Selection.FontSize = fSize;


Last two lines has no effect, but has effect for PlaintText.

Viewing all articles
Browse latest Browse all 1022

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>