Listbox loses cell contents when contains EndofLine

With Xojo 2019r3.1 or 2019r1 or 2016r3, on Windows 10

When I put something like “aaa”+endofline+“111” in a cell, then I edit this cell, all the characters after endofline are lost

Only on Windows, not on MacOS

Test projet : click on “fill the list”, select the 2nd line and and click on “text of selected line” --> you see bbb endofline 777
then edit this cell, then re click on “text of selected line” --> you see only bbb

How to avoid this behavior??

Marc

test project : lis13.xojo_binary_project

The control that pops up for editing a Listbox cell is a TextField. I’m not too shocked with this one. If you need multi-line editing with a listbox, it’s arguable from a user experience standpoint that you need a sheet or modal window to do so.

And why would it work on a Mac, then?

The Mac TextField is a little bit… interesting. You can paste multi-line content into a TextField where Multiline=false and navigate around it with the arrow keys, but it isn’t easy.

You might find this example useful. From a user experience standpoint, this operates the way editing a Constant does in the IDE.
https://www.dropbox.com/s/8gg38v7k77nh26y/MultiLineEdit.xojo_binary_project?dl=1

it works on win like on mac if I change this line :

listbox1.ColumnType(0) = listbox1.TypeEditable

for this

listbox1.ColumnType(0) = listbox1.TypeEditableTextArea

thanks Tim for your example, but I prefer the editable cell

Glad you found a solution that works!