On Oct 30, 2008, at 01:32, Andrew Merenbach wrote:

What operating system are you deploying to, and which SDK are you linking against? If you're using anything before Leopard, you're out of luck with your present method, as clipping was not enforced among sibling views prior to 10.5. There might possibly be caveats using 10.5, as well, although I'm not versed enough to know what they are -- hopefully someone with more experience, in this particular issue, will be able to chime in.


I'm linking against 10.5. Thanks for pointing that issue.


On Oct 30, 2008, at 01:44, Rob Keniger wrote:

Try double-clicking the Image view in IB, which will move IB's "active selection" to the view itself. If you now drag a text field to the image, it will be placed as a subview of the NSImageView and always display in front.

Thanks for your suggestion Rob, but I tried that but couldn't make it work when the image is in an NSView.

Here's what i did:

- created a new Cocoa application project,
- opened the xib,
- dragged an NSApplication image from the media tab in IB to the window,
- dragged a label (NSTextField) on top of the image,
- saved, build and run.

The label is correctly drawn over the image. Then I:

- dragged a custom view (NSView),
- dragged an NSApplication image in the custom view,
- double-clicked the image, the white frame comes up to show that I'm inside the image's view, - dragged a label (NSTextField) on top of the image and couldn't put it *in* the image's view. No matter what I do, IB doesn't let me. I tried to moved it inside by switching to list view in IB and dragging the label inside the image view but no luck.
- saved, build and run.

The label is drawn behind...

Thanks to both Brandon and Mark who suggested to reverse the order. That solves the problem! Now, for what I currently need (having a label over a gradient background), this is a small issue. When you want an entire layout build on top of an image background, this becomes much more involving. Sure, there's a workaround but I think it's better to file a bug on radar so that this *behavior* is fixed, and I'll do that :-)

Thanks to all for your suggestions,

Andre Masse
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to