[Mono-osx] Dynamically add User Control (SubView) defined in the Nib

=?gbk?B?s/XS9KW7pfOlsaXz?= senken at bangumi.tv
Wed Dec 14 04:49:03 EST 2011

I think "AddSubview" is the right approach. If it doesn't work, try "SetFrameOrigin" to set the subview to a right position. Be noticed that the Mac's screen coordinate is different from Windows or iOS, which starts from the left-bottom corner of the screen (WIN or iOS start from left-top corner).

I'm new to MonoMac too, hope it helps.
------------------ Original ------------------
From:  "Tomas Trescak"<tomi.trescak at gmail.com>;
Date:  Wed, Dec 14, 2011 05:32 PM
To:  "mono-osx"<mono-osx at lists.ximian.com>; 

Subject:  [Mono-osx] Dynamically add User Control (SubView) defined in the Nib


I'm very new to the Cocoa - Objective C programming, but I have more 
than 8 years of c# programming.
My problem is following:

How do I dynamically add a new user control (Cocoa control) to the 
The control is defined in the NIB (.nix) file.
I could not do this nor in the Interface Designer, nor in the program code.
For the "Groupbox" control I have found a method "AddSubview" which does 
nothing, but I'm just probably not using it right.

Any ideas are greatly appreciated

Have a wonderful day

Mono-osx mailing list
Mono-osx at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20111214/f7dcec32/attachment-0001.html 

More information about the Mono-osx mailing list