How to handle PopupMenu

I have an TLabel create in run time where I define a PopupMenu.


typedef struct a {

TLabel *LBnumber,*LBname;

TIcon *icon ;

char name[15];

void *first,

*last;

struct a *next;

} map_entity;


aux_e->LBnumber = new Stdctrls::TLabel(FRM_Main);

aux_e->LBnumber->PopupMenu = FRM_Main->MyPopupMenu_Tracks;




In FRM_Main I have several TLabels. When i click with right-button, the PopupMenu appears, however i dont known whose Label i clicked.


void __fastcall TFRM_Main::MyPopupMenu_TracksPopup(TObject *Sender)

{

// who is my parent ?

}





Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories