mail-archives/mono-osx/2011-September/004575.html

87 строки
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-osx] Creating a custom sheet
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Creating%20a%20custom%20sheet&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="004574.html">
<LINK REL="Next" HREF="004576.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-osx] Creating a custom sheet</H1>
<B>Andrew Ayre</B>
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Creating%20a%20custom%20sheet&In-Reply-To="
TITLE="[Mono-osx] Creating a custom sheet">andy at britishideas.com
</A><BR>
<I>Thu Sep 15 11:04:28 EDT 2011</I>
<P><UL>
<LI>Previous message: <A HREF="004574.html">[Mono-osx] Putting Images in a Subfolder
</A></li>
<LI>Next message: <A HREF="004576.html">[Mono-osx] Creating a custom sheet
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4575">[ date ]</a>
<a href="thread.html#4575">[ thread ]</a>
<a href="subject.html#4575">[ subject ]</a>
<a href="author.html#4575">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>I've added a Window with a controller to my project and changed the
parent class to NSPanel. I've set the style to &quot;Document Modal&quot;. 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:
<A HREF="http://stackoverflow.com/questions/5149753">http://stackoverflow.com/questions/5149753</A>
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
--
Andy
PGP Key ID: 0xDC1B5864
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="004574.html">[Mono-osx] Putting Images in a Subfolder
</A></li>
<LI>Next message: <A HREF="004576.html">[Mono-osx] Creating a custom sheet
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4575">[ date ]</a>
<a href="thread.html#4575">[ thread ]</a>
<a href="subject.html#4575">[ subject ]</a>
<a href="author.html#4575">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
mailing list</a><br>
</body></html>