Re: [Mono-winforms-list] Odd StatusStrip.PreferredSize behavior

2010-05-17 Thread Mike Fried
I think I figured out a simple enough workaround. My StatusStrip was Empty.
Adding just a simple ToolStripStatusLabel to it fixes the issue.

The Control that I'm writing that uses this is custom drawn, and I tried
to write some smallish -- about 100 lines of test case code to figure out
more directly within a custom-drawn form via copy/paste, but I ended up not
being able to reproduce the issue when doing that (something else must be
causing the sizing that I'm observing -- perhaps the controls themselves are
interacting because of the order that they are added to the UserControl and
the UserControl itself gets its space from a custom-designed tearable tab
control...).

I don't know how to reduce my bug down to a small enough test case to be
useful.
:^(


On Mon, May 17, 2010 at 5:50 PM, Carlos Alberto Cortez <
calberto.cor...@gmail.com> wrote:

> Hello,
>
> This seems to be a bug in our implementation. If you provide a test case (a
> small one ideally) we can try to figure out what's happening.
>
> Carlos.
>
> 2010/5/17 Mike Fried 
>
>>  I'm writing a program under Windows in Visual Studio (2008, switching to
>> 2010 soon) that will target Linux using Windows Forms and .NET Framework/CLR
>> 2, but I started testing under Mono and making changes to work around issues
>> in Mono and in Mono under Linux only recently (using Ubuntu 10.4 and SUSE).
>>
>> I discovered a bunch of bugs that don't reproduce on Windows, many of
>> which I could simply work around by switching off the System.Environment
>> variable or working around in trivial ways, but I'm looking for a better
>> solution in particular for one bug. The current bug that's biting me is that
>> in a custom editor that I have written, I perform manual layout of the
>> scrollbars and status bar, but when I go to get the PreferredSize from the
>> StatusStrip in Mono (Windows and Linux), it returns (22, Height) and in .NET
>> it returns (Width, 22).
>>
>> I took a peek at the source code to the Mono 2.6.4 branch of 
>> StatusStripand
>> ToolStrip
>>  to
>> try and understand what's going on, and I tried a number of things without
>> making some kind of test against the width or height to work around the
>> preferred size being "wrong", but I couldn't get the desired behavior. I've
>> searched the web without finding anything else about this.
>>
>> Is this a known issue? Does anyone have any alternative APIs that they
>> suggest I use instead? I'd like to fix this code and move on so that
>> regardless of what kind of Fix mono takes later, it won't break my code in
>> the future.
>>
>> Thanks,
>> Mike Fried
>>
>>
>> ___
>> Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>>
>>
>
___
Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list


Re: [Mono-winforms-list] Odd StatusStrip.PreferredSize behavior

2010-05-17 Thread Carlos Alberto Cortez
Hello,

This seems to be a bug in our implementation. If you provide a test case (a
small one ideally) we can try to figure out what's happening.

Carlos.

2010/5/17 Mike Fried 

> I'm writing a program under Windows in Visual Studio (2008, switching to
> 2010 soon) that will target Linux using Windows Forms and .NET Framework/CLR
> 2, but I started testing under Mono and making changes to work around issues
> in Mono and in Mono under Linux only recently (using Ubuntu 10.4 and SUSE).
>
> I discovered a bunch of bugs that don't reproduce on Windows, many of which
> I could simply work around by switching off the System.Environment variable
> or working around in trivial ways, but I'm looking for a better solution in
> particular for one bug. The current bug that's biting me is that in a custom
> editor that I have written, I perform manual layout of the scrollbars and
> status bar, but when I go to get the PreferredSize from the StatusStrip in
> Mono (Windows and Linux), it returns (22, Height) and in .NET it returns
> (Width, 22).
>
> I took a peek at the source code to the Mono 2.6.4 branch of 
> StatusStripand
> ToolStrip
>  to
> try and understand what's going on, and I tried a number of things without
> making some kind of test against the width or height to work around the
> preferred size being "wrong", but I couldn't get the desired behavior. I've
> searched the web without finding anything else about this.
>
> Is this a known issue? Does anyone have any alternative APIs that they
> suggest I use instead? I'd like to fix this code and move on so that
> regardless of what kind of Fix mono takes later, it won't break my code in
> the future.
>
> Thanks,
> Mike Fried
>
>
> ___
> Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>
___
Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list


[Mono-winforms-list] Odd StatusStrip.PreferredSize behavior

2010-05-17 Thread Mike Fried
I'm writing a program under Windows in Visual Studio (2008, switching to
2010 soon) that will target Linux using Windows Forms and .NET Framework/CLR
2, but I started testing under Mono and making changes to work around issues
in Mono and in Mono under Linux only recently (using Ubuntu 10.4 and SUSE).

I discovered a bunch of bugs that don't reproduce on Windows, many of which
I could simply work around by switching off the System.Environment variable
or working around in trivial ways, but I'm looking for a better solution in
particular for one bug. The current bug that's biting me is that in a custom
editor that I have written, I perform manual layout of the scrollbars and
status bar, but when I go to get the PreferredSize from the StatusStrip in
Mono (Windows and Linux), it returns (22, Height) and in .NET it returns
(Width, 22).

I took a peek at the source code to the Mono 2.6.4 branch of
StatusStripand
ToolStrip
to
try and understand what's going on, and I tried a number of things without
making some kind of test against the width or height to work around the
preferred size being "wrong", but I couldn't get the desired behavior. I've
searched the web without finding anything else about this.

Is this a known issue? Does anyone have any alternative APIs that they
suggest I use instead? I'd like to fix this code and move on so that
regardless of what kind of Fix mono takes later, it won't break my code in
the future.

Thanks,
Mike Fried
___
Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list