PDA

View Full Version : NSTabView Problems




Soulstorm
Jan 25, 2008, 06:34 AM
I have an NSTabView, and I have an NSImageView behind it, filled with some image. The NSImageView is outside the NSTabView. Somehow, I can't get the image behind the tab view being displayed. For some reason, the TabView interior keeps being drawn and it results in something like this:

http://www.hard-light.net/forums/index.php?action=dlattach;topic=51391.0;attach=4596;image

Can anyone tell me how I can get the image from the background be displayed?

Note that this happens only on 10.4. In 10.5, it is being displayed correctly. It seems as a false configuration from IB...

Help...! :)



kpua
Jan 25, 2008, 08:00 AM
Is the tab view a subview of the image view, or just a sibling positioned on top of it? Tiger cannot handle overlapping views like Leopard can now.

Soulstorm
Jan 25, 2008, 08:34 AM
Is the tab view a subview of the image view, or just a sibling positioned on top of it? Tiger cannot handle overlapping views like Leopard can now.

The tab view is just a sibling positioned on top of the NSImageView. It can be done. I have done it before (http://www.hard-light.net/forums/index.php/topic,44568.0.html), but I don't remember how! Even reopening my old project doesn't help...

kpua
Jan 25, 2008, 08:37 AM
Hmm... I'm surprised, because it's definitely not supported. Why not just try making it a subview?

Soulstorm
Jan 25, 2008, 08:55 AM
It is a bug.

If you want to do things like the ones I want, you must set your window to be "textured".

Soulstorm
Jan 27, 2008, 10:53 AM
Hmm... I'm surprised, because it's definitely not supported. Why not just try making it a subview?

Sorry, but can you tell me where did you read this? I am not doubting it, I am just asking, because I am wondering: What I have done is based on a bug, or the fact that I couldn't do it perviously is a bug?

Anyway, what I found out is that wether it is supported or not, it can be done if the window that holds the NSTabView is textured.

I didn't want to make a subview, because I would need to set the image on the subview for each tab I have (and I have 7). Not to mention that when the program runs, the image is cropped and I also observed some tearing where the tabView ends and the background window starts...