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

Jonathan Pobst monkey at jpobst.com
Wed Mar 4 11:32:06 EST 2009


How about this one?

Jonathan


Alex Shulgin wrote:
> Jonathan Pobst wrote:
>>>> Does the attached patch fix the issue for you?
>>>
>>> Well, partially.
>>>
>>> The height is determined correctly, but there's still extra 
>>> decoration to the left and right of the hosted item as demonstrated 
>>> on attached screenshot.
>>
>> Like your first email says, we need to figure out why that 68 is 
>> there.  It is a crutch to support the common case, but it messes up 
>> less common cases like this.
>>
>> While your patch works around the issue, its not the correct solution. 
>> This 68 needs to be dynamically calculated from something, whether its 
>> margins or paddings or preferred sizes of MenuItems.
>>
>> I will try to look at this some this week if you don't want to dig any 
>> deeper.
> 
> Hi,
> 
> Thanks for your responses!
> 
> Apparently, .NET ToolStripDropDown behaves differently when it's hosted 
> inside ToolStrip and when it's used standalone.
> 
> I'm attaching a sample .cs and a PNG screenshot to demonstrate the 
> difference.
> 
> So possibly, the correct solution would be to introduce some flag that 
> indicates the drop down is used standalone (or determine this from the 
> existing data like missing Owner, etc.) and adjust layout and painting 
> accordingly.
> 
> -- 
> Alex
> 
> ------------------------------------------------------------------------
> 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tsdd.patch
Url: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20090304/11cf5184/attachment.pl 


More information about the Mono-winforms-list mailing list