Skip to content

Context menu strip for a button

j_sen21

Asked Nov 4, 2007, 8:14 AM EST1 answer
Share
LinkedInX

Is there a way when clicking a button, menu pops up with new buttons in a menu strrip.

I tried below and the event doesnt know ackowledge anything but tostring, getype and hash and equals.

thanks

 

TypeScript
private void btnBusiness_Click(object sender, EventArgs e)
{
//UpdateAttributes();
if (e.Button == MouseButtons.Left)
{
this.contextMenuStrip1.Show(this.btnBusiness, e.Location);
}

}

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Could you elaborate a bit? Am I getting this right: When you press a certain button, you want a menu strip to pop out and show some menu items depending on a certain situation. e.g. when a button "simple" is pressed a File menu will pop up only showing "save" and "open". If a button "advanced" is pressed, the File menu will show "File Properties" and "Page Layout".
    0