Odd behaviour in setContentView:
Odd behaviour in setContentView:
- Subject: Odd behaviour in setContentView:
- From: Jeff Laing <email@hidden>
- Date: Fri, 9 Dec 2005 09:55:25 +1100
I'm having an odd problem with some user-interface twiddling I'm doing.
Basically, my main app has a window that contains an NSBox.
The app is intended to load plugins which will insert their own controls
into that box. (At the moment, its just hard-wired into the same app, but I
want to change that - lets just assume it's a plugin)
The plugin loads its own nib, which has an instantiated NSView that contains
its own NSBox, which the plugins controls will be in. The plugin locates
the NSBox fine and extracts its contents via [NSBox contentView], then
passes that to the owning app.
The app uses [NSBox setContentView:] to put the plugin controls into the
window and it *almost* works - the controls are there, connected correctly,
clicks work fine. However, for some reason, all of the content seems to be
displayed vertically. Ie, if all the sub-controls where 10 pixels down in
the plugin's box, they look to be about 30ish pixels down in the apps. I
think that the horizontal displacement is ok, but its hard to tell.
I'm assuming that there's some sort of setContentViewMargins: mumbo-jumbo
I'm supposed to be doing, but I can't work it out. Does anyone have sample
code that does this sort of thing?
Thanks in advance,
Jeff.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden