[Mono-osx] Create window at runtime

Troy Dawson troy-dawson at comcast.net
Mon Jan 16 23:31:53 UTC 2012


On Jan 16, 2012, at 3:23 PM, De Santis Luca wrote:
> On the other toolkits like GTK or Winform I can create window at runtime, they don’t need of file like xib. I like know if on MonoMac I can make something like that, without load xib file.

Sure.

NSWindow has a designated initializer that you can use to instantiate NSWindows (and subclasses of NSWindows) via a new call. Eg (AppWindow is a subclass of NSWindow):

		public AppDelegate()
		{
			app_window = new AppWindow(new RectangleF(100,100,600,400-44));

			app_window.MakeKeyAndOrderFront(this);
		}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-osx/attachments/20120116/aaf6ed8f/attachment.html>


More information about the Mono-osx mailing list