Re: sorting control arrays
Welcome to the forum!
Have you used the controls Tag property?
It's a great place to store info
Re: sorting control arrays
here is how I load the total score into the label control:
Code:
For I = 0 to intNumberofPlayers -1
intScore(I) = txtEnterScore(I).Text
intTotalScore(I) = intTotalScore(I) + intScore(I)
lblTotalScore(I).Caption = intTotalScore(I)
txtEnterScore(I)=""
Next
this adds each players score for the current round to their total score and displays the score in the label TotalScore. My player names are held in txtPlayerName(I). Can I make lblTotalScore(I).tag = txtPlayerName(I)? Will the tag property have the player number, the player name, or ?
thanks
Re: sorting control arrays
The tag property are string values. So you can pretty much make the tag represent anything. It would make sense to make it reference your txtPlayerName index.