Android Question Radio Buttons Event

davelt99

Member
Licensed User
Longtime User
I've created three global radio buttons, rb1,rb2,rb3.
When loading a Layout, I initialize them with an event name "showTasks" and then add all three to a panel that has been created in the Designer.

My problem is that when a rb1, rb2 or rb3 is Clicked, the showTasks event never fires.

{sub Globals
.....
dim rb1,rb2,rb3 as radiobutton
end sub

sub LoadLayout
rb1.initialize("showTasks")
rb1.tag="radio1"
rb2.initialize("showTasks")
rb2.tag="radio2"
rb3.initialize("showTasks")
rb3.tag="radio3"
pnl.AddView(rb1,0dip,5dip,90dip,27dip)
pnl.AddView(rb2,120dip,5dip,90dip,27dip)
pnl.AddView(rb3,250dip,5dip,90dip,27dip)
end sub

sub showTasks()
dim r as radiobutton
r=sender
log(r.tag)

end sub
}
 

DonManfred

Expert
Licensed User
Longtime User
I dont think that showtask is the right eventName
I mean the Sub signature

Probably showtask_click?
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
The auto-completion feature is a powerful friend!
When you type "sub " and the hit tab, a list of controls appears and upon selecting one, the relevant events are selectable! The only thing you need to add is the event name!
 
Upvote 0
Top