array valuse and visablity

starcraft

Centurion
Joined
Jun 29, 2003
Messages
167
Location
Poway CA
OOOOOKKKK. I have ALOT of things i wont to put into an array *I'll do the man power so help me with this unless there IS a better way to do it*. I wont to assign each entry in the array with several valuse like a 3 letter/# code. I also wont to beable to have like an active and non active setting like when i program starts all entrys have a valuse of used false, so its in listbox2, but if the user selects an entry in listbox2 and presses button1 it will set that entry to used=true and move it to listbox1. I hope i expliained it well enough :p give me your ideas
 
If im understanding you right you could have a class or a structure with two values, one for the code and another code with the boolean value and then put each of them in an array.
 
i dont understand what that means but i can figure out what it does but heres an example of what i'm looking to do:::::::

#1-
pants -
active = false
color = blue
code = kij

#2-
shorts -
active = false
color = pink
code = bja

#3-
socks -
active = false
color = white
code = soc
I wont to pu the shorts, socks, and pants in an array but have their values still be pressent and active for them. So i could do like.

if bja.active = true then
listbox1.show = false
listbox2.show = true
textbox1.text = bja.code
textbox1.color = bja.color


*something like that:confused:
 
So you could do this:
Visual Basic:
Public Class SomeClass
Public active As Boolean
Public color as Color
Public code as string
End class
Or with a structure:
Visual Basic:
Public Structure SomeStruct
Dim active As Boolean
Dim color as Color
Dim code as string
End Structure
Then you could declare your object as one of those and then put it into an array.
 
Back
Top