TAdvListEditor - still doesn't allow modifying raw paste text in

I updated to the latest

Although there is a new event OnPasteValue, it still doesn't allow modifying raw input, as noted in:

If a multiline input such as:

line 1
line 2
line 3

Is pasted, the Value parameter will only hold line 1.

However, if the paste is allowed, it will paste:

line 1

And when the edit is done, it will modify this to:

line 1line 2line 3

Indicating that in the internal buffer it still holds the CRLF but it doesn't present it in the OnValuePaste event for me to modify it. I need to replace CRLF with comma in my own code to prepare it for OnValueEditDone event, and not that the TAdvListEditor does that for me.

Something like this:

void __fastcall TForm1::AdvListEditor_ToValuePaste(TObject *Sender, UnicodeString &Value, bool &Allow)
// This should convert "line 1\r\nline 2\r\nline 3" to "line 1,line 2,line 3"
Value = StringReplace(Value, "\r\n", ",", TReplaceFlags() << rfReplaceAll);
Allow = true;

As it is right now, I can only get what it has already modified, and not what was actually pasted.

I guess that you need to filter for CRLF - AFTER - the OnValuePaste event, not before.

Can you please fix this?

This issue was specifically related to handling multiline text.
We fixed it now. The next release will address this.

1 Like

Thank you, awaiting that update to test it.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.