/*
OnPopup example
The following code enables the Copy item from the pop-up menu if the edit control 
has a nonempty selection.
*/ 
void __fastcall TForm1::PopupMenu1Popup(TObject *Sender)
{
  Copy1->Enabled = (Edit1->SelLength > 0);
} 
