Hi,
I have a question regarding the possibility of looping intialization of views. In other words, i have a bunch of textfields and labels that i want to send to a function to initialize them all such as this:
Replace:
By:
Is that possible? or do i have to go through each of my 120 textboxes and labels to set the initialization and the font size...?
I have a question regarding the possibility of looping intialization of views. In other words, i have a bunch of textfields and labels that i want to send to a function to initialize them all such as this:
Replace:
B4X:
Private txtbox as TextField
txtbox.initialize("")
txtbox.font=createnew2(...,14)
Mainpanel.addview(txtbox,20,20...)
By:
B4X:
Private txtbox as TextField
buildElement(txtbox)
Sub buildElement(txtbox as (?), ini as string, fontsize as int, left, top...)
txtbox.initialize(ini)
txtbox.font=createnew2(...,fontsize)
Mainpanel.addview(txtbox,left,top...)
End Sub
Is that possible? or do i have to go through each of my 120 textboxes and labels to set the initialization and the font size...?