Sign in to follow this  
Followers 0
soonyee91

Data sorting in array

2 posts in this topic

I'm not really sure how to do this. 

I use fileopendialog function to obtain multiple filepaths. The filepaths will stored in a variable.

However, when i display the variable's value into a listbox. It sort my files not according to original position:

For example:

L11ABC-B1

L11ABC-B13

L11ABC-B2

L11ABC-B3

(*This is the outcome display from the listbox)

What I want is:

L11ABC-B1

L11ABC-B2

L11ABC-B3

L11ABC-B13

My question is where is the problem causing this? Sorting happen when storing filepath to array? or Sorting happen in display it in listbox?

This problem has been bugging me for days...

Share this post


Link to post
Share on other sites



I think I found the problem. The problem is because default listbox style will sort the element in it but it will not change the arrangement inside the variable. So the solution is to cancel sorting in listbox. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0