[Mono-winforms-list] [BUMP] ToolStripDropDown + UserControl

eschneider eschneider.nabble at schneidersoft.com
Sun Mar 8 19:53:41 EDT 2009


Hello, 

This is the same issue I'm having. I Filed a bug and test case for it here:
https://bugzilla.novell.com/show_bug.cgi?id=483146

Thanks,
Eric



Jonathan Pobst wrote:
> 
> I committed the less risky parts of this, hopefully it will fix your 
> issues.
> 
> There are problems with things like checking ToolStripItem.Owner, 
> because of ToolStrip/MenuStrip merging, where items may be owned by one 
> ToolStrip, but are actually parented to and showing up on another
> ToolStrip.
> 
> If you have additional changes, please use svn diff, so I can apply them 
> better.
> 
> Thanks!
> Jonathan
> 
> Alex Shulgin wrote:
>> 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
>> 
>> 
>> 
> 
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> 
> 

-- 
View this message in context: http://www.nabble.com/ToolStripDropDown-%2B-UserControl-tp22184714p22404731.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list