[Mono-winforms-list] [BUMP] ToolStripDropDown + UserControl
Alex Shulgin
alexander.shulgin at yessoftware.com
Wed Mar 4 08:52:08 EST 2009
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 --------------
A non-text attachment was scrubbed...
Name: tsdd-toolstrip-and-standalone-dotnet-mono.png
Type: image/png
Size: 11194 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20090304/97f4ffc9/attachment-0001.png
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Form1.cs
Url: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20090304/97f4ffc9/attachment-0001.pl
More information about the Mono-winforms-list
mailing list