- Offizieller Beitrag
Q: I am loosing Styles and Numbering&Bullets when creating a report using WPSuperMerge (WPReporter)
A: You need to use the same TWPRTFProps object for both TWPRichText object. This way, the styles, numberstyles, color and font tables are shared.
You can do this by
a) adding the variable
FAllProps : TWPRTFProps;
to the TForm class and
b) assign the following event handling procedure to the event OnInitializeRTFDataObject of both, the Source and the Destination TWPRichText:
Code
// required handler for WPRichText1 and WPRichText2
procedure TForm1.WPRichText_InitializeRTFDataObject(Sender: TObject;
var RTFDataObject: TWPRTFDataCollection;
var RTFPropsObject: TWPRTFProps);
begin
// we added this variable to the private section of TForm1:
// FAllProps : TWPRTFProps;
if FAllProps=nil then
FAllProps := TWPRTFProps.Create;
RTFPropsObject := FAllProps;
end;
Alles anzeigen