Hi guys,
I'm having an issue when the user copies data (text) from whatsapp web and pastes it on a dw column. Seems that text has only ~n, not the usual ~r~n that Windows uses. The problem with that is: when the column has focus, PB doesn't recognize the ~n as a linebreak, but when the column looses focus, it shows the text correctly!!
My thought: intercept the pasting of text, and pre-convert all the '~n' (that are not already ~r~n) to '~r~n'.
I can use the editchanged event, but it is triggered at every keystroke.
I tried creating an event based on pbm_paste, but it doesn't seem to get triggered when I paste.
So help me please, what event should I use? Or can I check if it was paste on the editchanged event? (either ctrl + V or right click + paste)
My whatsapp message, that I copy from Chrome or Edge:
The column on my app, when I paste the contents of the message and it has focus:
this is when I hit tab, so the dw loses focus:
If I click on the column again, it goes back to the first view, as if no enters where there.
If I do a pos('~r~n') it returns 0, but pos('~n') returns the positions ok.
If I do a manual "enter" from my keyboard, it inputs a ~r~n, as expected.
Oh, I'm using PB 2022 R3, build 3391. It's the same behavior either using the IDE or building the EXE.