|
-
Feb 21st, 2004, 11:10 PM
#1
Thread Starter
Registered User
sort a listbox
list1(1).sorted = true
why doesnt that work? i get a cannot assign to read-only property error
-
Feb 22nd, 2004, 01:34 AM
#2
Set it at design time from the properties on the right.
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
-
Feb 22nd, 2004, 02:29 AM
#3
Thread Starter
Registered User
cant do that using arrays.... unless i load the object without using the code to load the array object, but i dont know how many arrays i will need, so that wouldnt work.
Last edited by Reki; Feb 22nd, 2004 at 02:34 AM.
-
Feb 22nd, 2004, 02:38 AM
#4
Frenzied Member
Dont think you can change the sort during runtime, and it's false by default.
-
Feb 22nd, 2004, 02:40 AM
#5
Yes you can. Select the list box and set it in the properties window, i did it.
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
-
Feb 22nd, 2004, 02:42 AM
#6
Thread Starter
Registered User
Originally posted by Ideas Man
Yes you can. Select the list box and set it in the properties window, i did it.
you can do it with a normal listbox, but not with an array that you load with your code. you cannot select a listbox where it cannot be seen
-
Feb 22nd, 2004, 02:44 AM
#7
Frenzied Member
He is creating them at runtime, how are you going to access the properties when it doesn't exist?
Originally posted by Ideas Man
Yes you can. Select the list box and set it in the properties window, i did it.
-
Feb 22nd, 2004, 02:45 AM
#8
Dunno, I'd say you could when you create it, i don't actually know how to create controls in code.
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
-
Feb 22nd, 2004, 05:16 AM
#9
We'll if all else fails, use a temp listbox, .visible = false, sorted = true.
Then transfer items there to sort them (clear sorter first), move them back to the source (source cleared first) then clear the sorter (just to make sure its clear).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|