I'm such a :sign0104: I'm even struggling with CASE SELECT! God.. Anyway....
Why doesn't my button clicks change the text of labels based on this code? tags have been set for both buttons. In your first interface tutorials, I see that the click sub is called "btnPage_Click". For some reason, the name of that sub makes or breaks the case selects. Somehow, is that subroutine name just PART of the names of all three buttons and picking up the first part of the name of all three buttons? Damn I'm really confused here. ? I ask that because when I change the btnPage_Click to btnMyClicker, it doesn't work! When I change it back, it works again. Is that name btnPage_Click the first part of the button names? I noticed that the button names are btnPage1, btnPage2 and btnPage3 loaded into the Main layout.
Oh yes, I want to really thank Margaret and Lagore for all their immense help. And anyone else who jumps in to rescue stupidity from itself (me)
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim lbl1 As Label
Dim lbl2 As Label
Dim btn1 As Button
Dim btn2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
'One click event for all buttons.
Sub btnPage_Click
Dim Send As Button
Send = Sender
Select Send.Tag
Case "1"
lbl1.Text = "Button 1 clicked."
Case "2"
lbl2.Text = "Button 2 clicked."
End Select
End Sub
Why doesn't my button clicks change the text of labels based on this code? tags have been set for both buttons. In your first interface tutorials, I see that the click sub is called "btnPage_Click". For some reason, the name of that sub makes or breaks the case selects. Somehow, is that subroutine name just PART of the names of all three buttons and picking up the first part of the name of all three buttons? Damn I'm really confused here. ? I ask that because when I change the btnPage_Click to btnMyClicker, it doesn't work! When I change it back, it works again. Is that name btnPage_Click the first part of the button names? I noticed that the button names are btnPage1, btnPage2 and btnPage3 loaded into the Main layout.
Oh yes, I want to really thank Margaret and Lagore for all their immense help. And anyone else who jumps in to rescue stupidity from itself (me)
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim lbl1 As Label
Dim lbl2 As Label
Dim btn1 As Button
Dim btn2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
'One click event for all buttons.
Sub btnPage_Click
Dim Send As Button
Send = Sender
Select Send.Tag
Case "1"
lbl1.Text = "Button 1 clicked."
Case "2"
lbl2.Text = "Button 2 clicked."
End Select
End Sub
Last edited: