[Mono-winforms-list] OSX - WinForms applications don't redraw on resize

Coda Highland chighland at gmail.com
Tue Nov 8 17:29:56 EST 2011

Software versions:
Mono 2.10.6
Mac OS X 10.6.7

I have written a very simple, nearly "hello world" WinForms
application -- a menu strip docked top, a read-only multiline text box
docked fill, and a single line text box docked bottom. Main() itself
consists of "Application.Run(new TestForm());" and otherwise
everything is exactly as exported from mwf-designer. (I have compared
the output of mwf-designer against the output of Visual Studio 2005
and have determined that there is no substantial difference in the
generated code.)

Compiling and launching the application works fine, but the interface
fails to repaint in almost all cases. The initial draw sometimes works
and sometimes doesn't (this seems to be up to the caprice of how the
windowing system decides to stack the new window on creation) but
later redraws misbehave terribly. This is particularly visible when
resizing the window, as the entire window goes white except for some
of the bevels during the resize, then beige except for some
(different) bevels after releasing the mouse button. The blinking
cursor is visible but it's in the wrong place (its original location,
from before the resize).

Pressing Cmd triggers the gradient on the menu strip to redraw. Typing
makes the new characters appear in the right location in the text box
with a white background but does not redraw the rest of the field,
including any text that was already in it. Essentially, updates that
are forced to redraw will redraw but resizes don't correctly trigger
updates as the geometry settles.

/s/ Adam

More information about the Mono-winforms-list mailing list