Re: NSTextView with transparent text?
Re: NSTextView with transparent text?
- Subject: Re: NSTextView with transparent text?
- From: email@hidden
- Date: Mon, 18 Mar 2002 15:00:08 -0800
Well, I didn't stare at your code for *too* long, but it looks like
you're not doing anything to make the background color for the
textview transparent, so your alpha text is just going to "show
through" to the solid background color. Am I missing something? In
what way exactly does the code you gave "not work"? What are you
trying to get the text to show through to -- some view behind the
textview, or the superview's drawn content, or whatever is behind the
window (i.e. all the way through to the back of the window buffer), or
what? Are there scrollviews, clipviews, etc. that might be
interfering with your goals by erasing to opaque colors?
Thanks for the reply!
Sorry, you're right, I wasn't very specific. I'm trying to put in some
red text with an alpha value, so it appears transparent. I didn't think
the background needs an alpha value - does it? I'm not trying to get
the text to show through the background - I want the text 50%
transparent or so. The TextView is inside a SplitView, which is inside
another SplitView. By "not work", I mean that the red text appears
completely opaque - setting the alpha value seems to have no effect on
what it looks like. I'm not trying to get it to show through something,
I want it to appear transparent, or in other words, dimmed - i.e. some
text appears at 60% the opacity of the other text. Do you have any
ideas?
Well, I'm still not sure I understand what you want here, but if you
just want the text to appear "dimmed", but not to be showing through to
anything behind it, I would abandon alpha -- just use a color that has
been mixed with a medium gray. It doesn't sound to me like there's any
need for transparency in what you're doing.
Maybe [myColor blendedColorWithFraction:0.4 ofColor:[NSColor
lightGrayColor]]?
Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.