[Mono-winforms-list] [BUMP] ToolStripDropDown + UserControl
Alex Shulgin
alexander.shulgin at yessoftware.com
Thu Mar 5 12:41:42 EST 2009
Alex Shulgin wrote:
> Jonathan Pobst wrote:
>> Patch committed.
>
> Thanks a lot!
>
>> It looks like the arrow is not painted when your sample is run on
>> .Net. I don't see any property or anything that controls that. I
>> guess it simply looks at its parent and only draws it if it is on a
>> ToolStripDropDownMenu and not a ToolStripDropDown.
>
> Yes, I've noticed this too.
>
> Now, I think I finally come up with a correct version which behaves
> pretty similar to .Net implementation.
>
> Please review a patch (use -p1 if in System.Windows.Forms dir) and
> screenshots.
Oh, I forgot the demo code. Here's the updated part:
public PopupMenu()
{
ToolStripMenuItem menuItem1 = new
ToolStripMenuItem("menuItem1");
ToolStripMenuItem subItem1 = new ToolStripMenuItem("subItem1");
subItem1.ShortcutKeyDisplayString = "Ctrl+A";
subItem1.ShowShortcutKeys = true;
ToolStripMenuItem subItem2 = new ToolStripMenuItem("subItem2");
subItem2.DropDownItems.Add("subSubItem21");
menuItem1.DropDownItems.Add(subItem1);
menuItem1.DropDownItems.Add(subItem2);
ToolStripMenuItem menuItem2 = new
ToolStripMenuItem("menuItem2");
menuItem2.ShortcutKeyDisplayString = "Ctrl+Z";
ToolStripLabel label1 = new ToolStripLabel("label1");
ToolStripButton button1 = new ToolStripButton("button1");
ToolStripDropDownButton ddbtn1 = new
ToolStripDropDownButton("ddbtn1");
this.Items.Add(menuItem1);
this.Items.Add(menuItem2);
this.Items.Add(label1);
this.Items.Add(button1);
this.Items.Add(ddbtn1);
}
--
Alex
More information about the Mono-winforms-list
mailing list