How are you doing this? Usually one Door library Event object handles one event for one control and the name of the Event object will identify the source. You can't get the original event raising control because the Sender, as far as the Basic4ppc event handling code sees it, is the Door library Event object and I can't see a way round this.
You should use three different event objects like DoorEvent1, DoorEvent2 and DoorEvent3.
Sender will return the name of the event object which you will be able to parse in order to find the actual control.
I can't have seperate events for each control because I add new controls in runtime.
I supose I can use AddObject to add an event, but since each event has an individual sub, I also need to add the sub in runtime (which is not possible).
This seems to work with Sender identifying the Event object
B4X:
Sub App_Start
Form1.Show
Obj.New1(False)
AddObject("Event1", "Event")
Obj.FromControl("Form1")
Control("Event1").new1(obj.Value,"MouseDown")
AddEvent("Event1", NewEvent, "CommonEventSub")
End Sub
Sub CommonEventSub
Msgbox(Sender)
End Sub