Hello guys!
I have a problem to sort the results in a listbox.
Here is an example of what I mean
I am trying to find a way to sort the results in columns in this way:Code:dim l as integer dim m as integer dim x as integer 'input value for loop dim y as integer 'input value for loop dim z as double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click For Me.L = 1 To x ' user gives the x For Me.M = 1 To y ' user gives the y z = l*M ListBox1.Items.Add("(" & L & "," & M & ")= " & z) Next M Next L Exit Sub
When the first 'L' loop ends then go to next column of the listbox.
Let's say the user gives x=5 and y=8. I would like to have a listbox
like this one in the attachment.
I have tried the listbox proporties ''Horizontal Scrollbar''
and ''MultiColumn'' but it didn't help... The sorting depends
on ListBox Height-Width. Any ideas?




Reply With Quote
