Slave; sto cercando un modo per rendere più pulito il mio codice semplificando una cosa del genere:
Label1.Text = ""
Label2.Text = ""
Label3.Text = ""
Label4.Text = ""
Label5.Text = ""
Label6.Text = ""
Label7.Text = ""
Label8.Text = ""
Label9.Text = ""
Label10.Text = ""
Label11.Text = ""
Label12.Text = ""
Label13.Text = ""
Label14.Text = ""
Label15.Text = ""
Label16.Text = ""
Label17.Text = ""
Label18.Text = ""
Label19.Text = ""
Label20.Text = ""
Esiste un modo per automatizzare questa cosa senza dover ripetere ogni riga? (Concettualmente vorrei dire al programma: assegna ai Label dal 1 al 20 il Text "bla, bla , bla") ???
Grazie Ceskho! :ok:
Però non mi funge :(:
PUBLIC SUB Form_Open()
DIM Oggetto AS Object
DIM i AS Integer = 1
FOR EACH Oggetto IN FMain.Children
IF Oggetto.Name = "Label" & i THEN
Oggetto.Text = ""
ENDIF
INC i
NEXT
END
così dovrebbe andare
DIM Oggetto AS Object
DIM i AS Integer
FOR EACH FMain.Children
IF InStr(FMain.Children[i].Name, "Label") <> 0 THEN
oggetto = FMain.Children[i]
oggetto.text = ""
ENDIF
INC i
NEXT