I trying to add 2 lines in one WebListBox-Cell.
I switched Multiline = true.
Now the text that is wider than the cell wraps to a new line.
But I want to control, when the break comes for the new line.
I think in HTML I would use something like this:
This is <BR/>a test.
So I have This is in the first line of the cell, and a test. in the same cell, but in a new line.
Is there a simple solution for this? e.g. Could I force Xojo to use the
command?
You can use ENDOFLINE…
"This is " + ENDOFLINE + “a test.”
Sounds great, but don’t work. [Xojo 2015.4.1, WebEdition, Mac OS X 10.11 El Capt.]
I tried this versions:
ListBox_Tab.cell(1,1) = "This is " + ENDOFLINE + "a test."
ListBox_Tab.cell(1,2) = "This is " + chr(13) + chr(10) + "a test."
ListBox_Tab.cell(1,3) = "This is " + chr(13) + "a test."
My test was using Xojo 2013r4.1 on Windows 8.1…
I added a listbox called lstTest
to a web page and set its property to Mulitline=true
In the shown
event for the we page I put…
self.lstTest.addrow("ABC" + ENDOFLINE + "DEF")
self.lstTest.cell( 0,1 ) = "TUV" + ENDOFLINE + "XYZ"
and both cells show the strings correctly on 2 lines each.
You are the best!
Your solution works!
[I used the OPEN Event, with the Shown - event it works.]
THANK YOU!
Edit: Xojo should add this in the documentation of the Weblistbox.