[Mono-list] Windows Forms AutoScroll - no scrollbars.

Stifu stifu at free.fr
Wed Oct 26 15:35:01 EDT 2011


Well, WinForms is not too bad on Windows and Linux, but works the worst on
Mac.

Possible workaround: try using HScrollBar and VScrollBar controls instead
Another workaround: launch your app this way: "MONO_MWF_MAC_FORCE_X11=1 mono
yourapp.exe", so as to specify you want to use the X11 driver (requires that
X11 is installed on your Mac) - This is the driver used on Linux (more
tested and more robust)

And if you want to fix this bug, I'd gladly help (although I do not have a
Mac).
Since this is Mac-specific, it must be in a Mac-specific class (that
implements an interface).
The problem may come from one of the System.Windows.Forms.CarbonInternal
classes
(https://github.com/mono/mono/tree/master/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal).
You said you cannot interact with the ScrollBar, so I assume this isn't just
a painting issue.


Edmund Kapusniak wrote:
> 
> Hello,
> I have just tried it out using mono 2.10.6 on Windows, and everything
> appearscorrectly.
> It looks like you are correct and it is a Mac-only problem. :-(
> Is there anything I can try to work around this?  Or any pointers about
> where to lookin the mono Windows Forms source code?
> I really only wanted to use mono to be able to quickly prototype a few
> things on mymac - I figured using Windows Forms would be quicker than
> learning a new windowing API.However the fact that I've tripped over
> something so soon has shaken my confidence abit!
> Thanks,
> -- Edmund
> 
> Stifu wrote:
>>
>> Hi,
>>
>> First, it would help to figure out if this bug affects all OSes or not. I
>> suspect it is Mac-specific, because I got AutoScroll to work on Windows
>> and
>> Linux.
>>
>> Could you try it on Mono Windows or Linux to confirm that it works?
>>
>>
>> Edmund Kapusniak wrote:
>> >
>> > Hi everyone,
>> >
>> >   I hope this is the correct place to ask my question.
>> >
>> >   I have this simple test program:
>> >
>> > using System;
>> > using System.Drawing;
>> > using System.Windows.Forms;
>> >
>> > static class Example
>> > {
>> >     public static int Main( string[] arguments )
>> >     {
>> >         Form form = new Form();
>> >         Button button = new Button();
>> >         button.Location = new Point( 0, 0 );
>> >         button.Size = new Size( 1000, 1000 );
>> >         button.Anchor = AnchorStyles.Left | AnchorStyles.Top;
>> >         button.Dock = DockStyle.None;
>> >         form.Controls.Add( button );
>> >         form.AutoScroll = true;
>> >         Application.Run( form );
>> >         return 0;
>> >     }
>> > }
>> >
>> >   On Windows using Microsoft .NET the program displays a form with
>> > scrollbars, and you can scroll around causing the very large button to
>> > change position.
>> >
>> >   Using Mono 2.10.6 on OSX, there are no scrollbars at all.  When you
>> > resize the form you can see a white flicker as if something is trying
>> to
>> > be drawn where the scrollbars should be, but nothing appears and you
>> > cannot interact with anything.
>> >
>> >   Is there something I am missing or is this a bug in Mono?  Any help
>> is
>> > appreciated!
>> >
>> > -- Edmund
>> >
>> >
>> > _______________________________________________
>> > Mono-list maillist - Mono-list at .ximian
>> > http://lists.ximian.com/mailman/listinfo/mono-list
>> >
>>
>>
>> --
>> View this message in context:
>> http://mono.1490590.n4.nabble.com/Windows-Forms-AutoScroll-no-scrollbars-tp3940210p3940433.html
>> Sent from the Mono - General mailing list archive at Nabble.com.
>> _______________________________________________
>> Mono-list maillist - Mono-list at .ximian
>> http://lists.ximian.com/mailman/listinfo/mono-list
>  		 	   		  
> _______________________________________________
> Mono-list maillist  -  Mono-list at .ximian
> http://lists.ximian.com/mailman/listinfo/mono-list
> 


--
View this message in context: http://mono.1490590.n4.nabble.com/Windows-Forms-AutoScroll-no-scrollbars-tp3940210p3941980.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list