Forum > RichMemo

CopyToClipboard

<< < (2/5) > >>

rick2691:
CopyRichText returns a lonint, so I assume that it is the length (sum) of what is copied. Since you ask the question, I now assume that it is something different. What is it, and how do I use it?

skalogryz:
CopyRichText() returns the number of characters copied over.
Usually it is expected to be equal to the number specified by SrcLen.
However, SrcLen can be set to -1 (meaning default whatever number of text is available). In this case the function returns the actual number of characters copied.

rick2691:
I was testing what attributes can be copied. I found that the text comes through but the colors are hit and miss. I also found that superscript and subscript are copied as text, but not with the attributes.

Then it all crashed. RichMemo reverted to an older version without the RichMemoUtils. I also cannot reinstall the new RichMemo. It has problems with the QT files.

Rick

skalogryz:

--- Quote from: rick2691 on September 14, 2021, 07:23:52 pm ---I was testing what attributes can be copied. I found that the text comes through but the colors are hit and miss. I also found that superscript and subscript are copied as text, but not with the attributes.
--- End quote ---
that is interesting. I presume you're trying richmemo with Qt5?


--- Quote from: rick2691 on September 14, 2021, 07:23:52 pm ---It has problems with the QT files.
--- End quote ---
what problem?

rick2691:
No, I am not trying or using it. However, I reinstalled Lazarus, then I tried to reinstall RichMemo. It took several tries, but then I succeeded. Installing packages is not an intuitive process, and nobody (by what I have not found) has posted the rules.

Nevertheless, I am operating again. What stands is that "Size8, Size16, Size12, Strike, Italic, Bold, Underscore, and ColorRed" are being copied. Unfortunately, my RTF search box is also highlighting the import, and that is automatically turning all colors to the first color ... black. But nothing is highlighted (selected) with my RTF replace box, so it is keeping the color.

But superscript and subscript is being copied without the attributes ... and causing a crash. With this rebuild I am not even attempting to test them.

Rick

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version