i'm trying to override the Onpaint event of the dropdownmenu.
this is what i did.
but of you recbuild and execute, it doesn't make use of the custom made 'ToolStripDropDownMenu'
what am i doing wrong?
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.All)]
public class cMyToolStripMenuItem : ToolStripMenuItem
{
public cMyToolStripMenuItem()
{
if (this.Owner != null)
{
base.DropDown = new MenuDropDown();
}
}
}
public class MenuDropDown : ToolStripDropDownMenu
{
public MenuDropDown()
{
base.BackColor = Color.Transparent;
//base.AutoSize = false;
MessageBox.Show
(
"MenuDropDown",
"MenuDropDown",
MessageBoxButtons.OK,
MessageBoxIcon.Information
);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
}
}