Android Question Radiobutton AND Button: can they work together?!?

SyntaxError

New Member
Licensed User
Longtime User
Hello Guys. I am new with programming with B4A + programming at all. I have a simple question:
I am using the Designer and have now 4 Radiobuttons plus an Ok-Button.
Is it possible somehow that both work together with an "AND". like this:

Sub Globals
Private Button1 As Button
Private OK As Button
Private Radiobutton1 As RadioButton
End Sub

Sub Button1_Click
If Button.Button1 = True AND RadioButton.Radiobutton1 = True Then Msgbox ("Button1 Click","")
End Sub

Thanks in advance


Manuel
 

barx

Well-Known Member
Licensed User
Longtime User
Not sure if I understand you properly but what about

B4X:
Sub Button1_Click
    if RadioButton1.Checked then
        'Button1 was clicked AND RadioButton1 was selected
    End If

End Sub
 
Upvote 0

Straker

Active Member
Licensed User
Longtime User
In your example you have 2 buttons and 1 radio button... Button1 is a standard button, so there is no 'true' but just _click
Try to explain better your question.

And if you post some code, please use [ code ] [ /code ] (without spaces) just to make your code more readable
 
Upvote 0

Straker

Active Member
Licensed User
Longtime User
In your example you have 2 buttons and 1 radio button... Button1 is a standard button, so there is no 'true' but just _click
Try to explain better your question.

And if you post some code, please use [ code ] [ /code ] (without spaces) just to make your code more readable
 
Upvote 0

SyntaxError

New Member
Licensed User
Longtime User
Damn. That was a fast answer. And it is working already.
Thank you very much Barx.

And thank you Straker for this comment. I will do this next time.
 
Upvote 0
Top