WPCubed Product Support

Loading Styles

Hello.

The WPRichtext has styles loaded at form creation like this.

frmMain.WPStyleCollection1.Clear;
frmMain.WPStyleCollection1.LoadFromFile(sStylesPath + 'Notes.ini');
frmMain.WPStyleCollection1.Update(frmMain.WPRichTextJobNotes.HeaderFooter.RTFProps);

I want to make sure these are the only styles available, even if the loaded text has additional styles attached in the header.

I would like the styles in the loaded text to remain attached to paragraphs but I do not want the styles added to the RTFProps.

Also, when I paste in text from word I seem to get a load of styles added. Is it possible to protect against this?

I've tried
frmMain.WPRichTextJobNotes.HeaderFooter.RTFProps.Locked := True;

but when I paste in something from Word I still get a load of new styles added.

In summary I want to load the styles into the RichText and ensure those are the only ones available.

Thanks.

#1 ♥ 0
3.5k Views 2 users read 1 min
support

Hi,

next release will have a setting for this. I sent you the units already.

Julian

#2 ♥ 0
This category is archived. No new posts are possible.