iOS Question multiple panels tag

tufanv

Expert
Licensed User
Longtime User
Hello

I am using :
B4X:
for i=0 to listtakip.size-1
        panel(i).Initialize("panel")
        panel(i).SetBorder(1,Colors.RGB(235,235,235),3)
        panel(i).Color=Colors.Transparent
        panel(i).Tag=eskitext.SubString2(eskitext.IndexOf("secilenid")+9,eskitext.Length)
next

in a sub. In another sub i want to retrieve which panel clicked. So I have to use a code with the following sub:

B4X:
sub panel_click

end sub

but i cant retrieve the tag of the clicked panel. I tried log(panel().tag) with no luck. What must i use to be able to retrieve the tag of the clicked panel?

TY
 

tufanv

Expert
Licensed User
Longtime User
I have another question for this. with Narek's help i can get the tag but i also want to change the other panels ( for example panel(5)) from another sub so i can change a panel's color from other sub. I cant declare the panel in process globals because i need the list size in jobdone sub. So i decalre them in jobdone. How can i reach the panel from outside sub so i can change its properties. ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…