WPCubed Product Support

pastefromclipboard

the pastefromclipboard method appears to be adding a carriage return when it executes. Thanks

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

Hi,

I cannot reproduce - do you have an example app?

Julian

#2 ♥ 0

It appears that the problem does not occur unless you have the following code in the OnNewRTFDataBlock event

RTFDataBlock.RTFProps.AttrHelper.Clear;
RTFDataBlock.RTFProps.AttrHelper.SetFontName('Verdana');
RTFDataBlock.RTFProps.AttrHelper.SetFontSize(10);
RTFDataBlock.FirstPar.LoadedCharAttr := RTFDataBlock.RTFProps.AttrHelper.CharAttr;

Thanks

#3 ♥ 0
support

Hi,

OnNewRTFDataBlock is also called to create the RTFDataBlocks which are used to load the text.

Please wrap your code into

if RTFDataBlock.Kind<>wpisLoadedBody then 
begin
...

end;

I is better to apply a fixed char attr to coped text in the BeforePasxte event.

Julian

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