[Mono-osx] Creating a custom sheet

Andrew Ayre andy at britishideas.com
Thu Sep 15 11:12:10 EDT 2011

Sigh. Have to uncheck "Visible at Launch" in Interface Builder. I'll
answer the question on SO...

On 9/15/2011 4:04 PM, Andrew Ayre wrote:
> I've added a Window with a controller to my project and changed the
> parent class to NSPanel. I've set the style to "Document Modal". Using a
> NSWindow instead doesn't seem to help.
> In my main window controller I have the following:
> MySheetController = new MySheetController();
> NSApplication.SharedApplication.BeginSheet(MySheetController.Window,
> this.Window);
> When the code executes the custom window opens but it is not modal and
> it is detached from the main window.
> Here is someone else who ran into the same problem:
> http://stackoverflow.com/questions/5149753
> I can get NSAlert.BeginSheet to work fine, but the NSAlert window is not
> quite suitable for my needs, hence the customization.
> Trying to meet my project deadline while seeming to struggle with every
> little thing that is easy in WinForms is exhausting. :(
> thanks, Andy

PGP Key ID: 0xDC1B5864

More information about the Mono-osx mailing list