Hi,
I wanted to use the column width of a ListBox as the Column Left Position in a Printing routine and falled into a question. Watch the screen shot below:
The image above shows the ListBox.ColumnWidths string format (Under Yosemite, Language: French if this is important).
A simple search does not returns anything in the format: ListBox1.ColumnWidth(i) where i is the number of the column I want to get the width.
So, Xojo compute and build the ColumnWidths Property to return it using the string format shown above, but if you want to use (psuedo and not working code below)
g. DrawString LB.Cell(Loop_Idx,Col_Idx), Col_Pos,Line_Pos
I have to compute ColPos using NthField (the delimiter is ‘,’) and remove the eventual leading string…
Is it a good idea to add a Property ListBox.ColumnWidth(Number-of-the-column-as-integer) and get the value as double ?
Your ideas are welcome (if I understand correctly the rebuild of Xojo Framework).
While I was writing this conversation text a crazy idea comes to me:
In NthField, we can read:
separator String The string that separates columns of data.
Does that means that separator is not a single character, but can be a string of characters (1 to n characters) ?
If so, the code to do what I want is lighter. This does not change the eventual “feature request”, question I ask your feeling.
I was to fast; some lines below I found:
The separator may be a string of any length.