I am using a loop to create a series of labels to hold the text that falls down the screen, below is the code I am using, the issue is I don't want to do this for every array of labels, i.e. label1(0), Label1(1), label2(0), Label2(1), Label3(0), Label3(1) etc. etc..
I would like to create a snippet of code that builds the labels for me, but the issue I have is that I can't work out how to index each label, Label(x) rather that Label1, Label2 etc.
Any ideas.
Cheers
Seadog
for TheArray = 1 to 100 Load Label1(TheArray) Label1(TheArray).Caption = Chr(RandomNumberGenerator(100)) Label1(TheArray).Top = 720 Label1(TheArray).Left = ((TheArray * 200)) Label1(TheArray).FontBold = True Label1(TheArray).Visible = True Load Label2(TheArray) Label2(TheArray).Caption = Chr(RandomNumberGenerator(100)) Label2(TheArray).Top = 480 Label2(TheArray).Left = ((TheArray * 200)) Label2(TheArray).FontBold = True Label2(TheArray).Visible = True Load Label3(TheArray) Label3(TheArray).Caption = Chr(RandomNumberGenerator(100)) Label3(TheArray).Top = 240 Label3(TheArray).Left = ((TheArray * 200)) Label3(TheArray).FontBold = True Label3(TheArray).Visible = True Load Label4(TheArray) Label4(TheArray).Caption = Chr(RandomNumberGenerator(100)) Label4(TheArray).Top = 0 Label4(TheArray).Left = ((TheArray * 200)) Label4(TheArray).FontBold = True Label4(TheArray).Visible = True etc etc next TheArray
This post has been edited by seadog: 16 April 2009 - 04:58 AM

New Topic/Question
Reply




MultiQuote





|