Jump to content

Odd behaviour from a ListBox


Recommended Posts

So I'm importing a CSV. I add each line to a ListBox for user review.

To aid readability, I use vs.AddListBoxTabStop, then use the <string>.replace method to change commas to tabs in the CSV data before adding it to the list box (I'm going to parse the original data separately).

The strangest thing is, when I run the script I only get two columns, even though there should be 6.

 

The "documentation" (ha!) says that "This function will clear all data in the list control."

"Ah," I think, "every time I call AddListBoxTabStop, it's clearing all the previous tabs."

Except that when I run it and look through the data, the list box only shows the last column. I can change the column count and all that shows is the last column, whatever it is.

 

Frex, the data contains a table of light#, X, Y, Z, Pan, Tilt values.

I always get the light# but if I add one column, I get light# and X. If I add two columns I get light # and Y, and so forth. Evidently the columns ARE there and picking up data correctly, they're just hiding like a naughty toddler.

 

Any ideas how to get all the columns to display properly?

I can dynamically resize the list box at runtime and the other columns still don't show, so if it's an issue of the tab columns not drawing properly I have no idea how to fix it as there are no column grips in the control.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...