|
-
Nov 8th, 2004, 02:36 PM
#3
In addition to the "List" property (which is the text you add via AddItem), the listbox also has an "ItemData" property, which is a long integer that you can use to assoicate a numeric value with each item. You can load the listboxes as follows (the NewIndex property refers to most recently added item) :
List1.AddItem "A"
List1.ItemData(List1.NewIndex) = 1
List1.AddItem "A#/Bb"
List1.ItemData(List1.NewIndex) = 2
List1.AddItem "B"
List1.ItemData(List1.NewIndex) = 3
List1.AddItem "C"
List1.ItemData(List1.NewIndex) = 4
List1.AddItem "C#/Db"
List1.ItemData(List1.NewIndex) = 5
etc.
"It's cold gin time again ..."
Check out my website here.
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
|