Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private Button1 As Button
Private Button2 As Button
Private Button3 As Button
Private Button4 As Button
Private Label1 As Label
Private Label2 As Label
Private Label3 As Label
Private Label4 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("l1")
Button1.Tag=1
Button2.Tag=2
Button3.Tag=3
Button4.Tag=4
Label1.Tag=1
Label2.Tag=2
Label3.Tag=3
Label4.Tag=4
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
Dim tag As Int
Dim Mybtn As Button
Mybtn = Sender
tag = Mybtn.Tag
Log(tag)
For Each v As View In Activity.GetAllViewsRecursive
If v Is Label Then
Dim myLabel As Label = v
If myLabel.Tag = tag Then
myLabel.Text="123"
End If
End If
Next
End Sub
Sub Button2_Click
Dim tag As Int
Dim Mybtn1 As Button
Mybtn1 = Sender
tag = Mybtn1.Tag
Log(tag)
For Each v As View In Activity.GetAllViewsRecursive
If v Is Label Then
Dim myLabel As Label = v
If myLabel.Tag = tag Then
myLabel.Text="456"
End If
End If
Next
End Sub
بسمه تعالی
با سلام خدمت اساتید
یه نگاهی به این بندازید
من لیبل رو فیتلر میکنم و میخوام به text ش مقدار بدم text باتن هایی که تگشون برابر تگ لیبل هست هم تغییر میکنن در مولتی پنل چرا؟
سوال
seyed_27 170
Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private Button1 As Button Private Button2 As Button Private Button3 As Button Private Button4 As Button Private Label1 As Label Private Label2 As Label Private Label3 As Label Private Label4 As Label End Sub Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: Activity.LoadLayout("l1") Button1.Tag=1 Button2.Tag=2 Button3.Tag=3 Button4.Tag=4 Label1.Tag=1 Label2.Tag=2 Label3.Tag=3 Label4.Tag=4 End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub Button1_Click Dim tag As Int Dim Mybtn As Button Mybtn = Sender tag = Mybtn.Tag Log(tag) For Each v As View In Activity.GetAllViewsRecursive If v Is Label Then Dim myLabel As Label = v If myLabel.Tag = tag Then myLabel.Text="123" End If End If Next End Sub Sub Button2_Click Dim tag As Int Dim Mybtn1 As Button Mybtn1 = Sender tag = Mybtn1.Tag Log(tag) For Each v As View In Activity.GetAllViewsRecursive If v Is Label Then Dim myLabel As Label = v If myLabel.Tag = tag Then myLabel.Text="456" End If End If Next End Sub
بسمه تعالی
با سلام خدمت اساتید
یه نگاهی به این بندازید
من لیبل رو فیتلر میکنم و میخوام به text ش مقدار بدم text باتن هایی که تگشون برابر تگ لیبل هست هم تغییر میکنن در مولتی پنل چرا؟
98.rar
لینک ارسال
به اشتراک گذاری در سایت های دیگر
1 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.