Listbox shows a part of data

Below data is in one column value of a table row (Oracle/remote server) and I am trying to display it in ListBox (Windows GUI). It works.

Errors in file /home/oracle/app/oracle/diag/rdbms/linuxtgt/linuxtgt/trace/linuxtgt_j000_40666.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_12600"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197

However, I just see the first line (1/8) in the ListBox even though when I copy the cell and paste it in other editor, I can see 8 lines all.

Do you know why the Listbox shows the first line?


Is the data in your “code” block a single value ?
You don’t tell us how you write the data into the listbox, neither what’s your use case.

I guess the data has an EndOfLine at the end of each line.
The listbox doesn’t adapt its row height to the content, so you’ll have to handle that differently.
Row height is at listbox level and apply to all rows.

You probably have end fo line markers that the list box interprets as the end of the cell data. perhaps you could try to remove those in the data before you add the row in the listbox.

darn… olivier beat me to the finish.

Yes, absolutely there is a EndOfLine at the end of each line.
Tried to remove it and expected the concatenated one line with below code but it doesn’t work.

tempColumnValue = tempColumnValue.ReplaceAll(EndOfLine,"")

Any idea?

As I understand it, you want to display more than one line of text in a Cell.

Who says that Listbox Cells display more than one text line at a time ?

Get an eye on the Feedback application / display the release notes and watch how many lines are displayed.

I don’t expect ListBox row to display multiple lines.
I am just thinking that I should merge all lines of my data having EndOfLine and keep the one row of ListBox.

You should check the exact ascii codes you get (0a/0d) and remove them all.
I’ve had the same problem when exchanging files cross-platform.

tempColumnValue = tempColumnValue.ReplaceAll(EndOfLine.Macintosh,"")
tempColumnValue = tempColumnValue.ReplaceAll(EndOfLine.OSX,"")
tempColumnValue = tempColumnValue.ReplaceAll(EndOfLine.UNIX,"")
tempColumnValue = tempColumnValue.ReplaceAll(EndOfLine.Windows,"")

Another option would be to use a hierarchical listbox, split your data in an array, show the first array element in the listbox as a folder and display the next elements when expanding the folder row.

Please refresh on the documentation!
Use for the above!

Tim is twice right on this one.

Always execute ReplaceLineEdings before using a string holding Return (characters even if you believe you know what they are).

This will save you time and headaches…

Good info Tim.

I did a test and I was able to use this code in pushbutton action:

TextArea2.Text = ReplaceLineEndings(TextArea1.Text, " ")

because I don’t want the first character of second line next to last character of first line.

I read and it only list Macintosh, Unix and Windows, but Xojo’s autocomplete also show OSX as an option. Is OSX the same as UNIX?

I decided to use another Textarea at the bottom of the screen and the rest lines are displayed when the cell (listbox) is clicked.
It is better than concatenate all lines and display it a cell I guess.

Thanks for help !!