Jump to content

Data sorting in array


Go to solution Solved by soonyee91,

Recommended Posts

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...

Link to comment
Share on other sites

  • Solution

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. 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...