DesktopTextArea in Listbox closes on Enter

I have a DesktopListbox with an editable cell of type DesktopTextArea. The following code places a large text area beneath the clicked cell. Multiline is set to true, but when I press enter, the edit field closes. How can I prevent this?

This is my code from the CellPressed Event:

me.EditCellAt(row, 1)
me.ActiveTextControl.Left = me.Left = + me.DefaultRowHeight
me.ActiveTextControl.Width = me.Width
me.ActiveTextControl.Height = 250
me.ActiveTextControl.AllowTabs = true
me.ActiveTextControl.AllowSpellChecking = False
DesktopTextArea(me.ActiveTextControl).MultiLine = true
return false

Is your DesktopListbox Multi-lines ?

Also: the documentation DesktopTextArea.Multiline says:

Changing this property at runtime has no effect.

It is multiline capable. I can e.g. paste multiline text and it appears as expected. But I cannot enter manual text with linefeeds.

DesktopListBox here do not display multiple lines.

I do not found at first how to set the Row Editable, read and re-read your first post then realized you explain how to do that.
And when I pasted a multiline text, only one line is displayed, and so when I pressed Return, only one line was painted…

Sorry, but I do not understand.

PS: I even go back to the Release notes, in vain. No multiple lines in DesktopListBox.

Tested with Xojo 2022r3 / Monterey 12.6.

Emile, perhaps see:

Thanks Tim, that why I suppose it is designed to work.

Emile, my posted code expands the TextArea, so you have multiple lines, in a box of 250px in height.
I can paste multiline code, which works and it is also saved into the cell’s value with linefeeds intact.

However, I cannot enter multiline text, because hitting Enter closes the edit field.

1 Like

Still only one line on display:

With pasted data:

Displayed data:

Sorry to bother you with that.

Harald: I hope you will find or get a solution.

This one turns it in multiline, but does not solve the ENTER problem:

As a workaround I open up a separate window for editing now. Looks like this is a broken listbox feature.

However, thanks for your suggestions!