Re: Text with translucent Background
Re: Text with translucent Background
- Subject: Re: Text with translucent Background
- From: Robert Napier <email@hidden>
- Date: Wed, 9 Apr 2008 11:08:12 -0400
Make sure the enclosing NSScrollView isn't drawing it's background:
[textView enclosingScrollView] setDrawsBackground:NO];
-Rob
--
Rob Napier -- Software and Security Consulting -- http://robnapier.net
On Apr 9, 2008, at 9:39 AM, email@hidden wrote:
Graham
Yes I am trying to draw it in a NSTextView. I tried what you
suggested but it did not work. I played with multiple combinations of:
[ textView setBackgroundColor:[ NSColor whiteColor ]/[ NSColor
clearColor ]];
[ textView setDrawsBackground:NO/YES ];
and switching the textView isOpaque to on and off.
I would look forward to any other suggestions.
Thanks
Fred
On 9 Apr 2008, at 12:43, Graham Cox wrote:
How are you drawing the text? If it's in a NSTextView you also need
to set the background colour of the view to clear, I believe, and
maybe you'll need to override the IsOpaque method to return NO.
(I'm not that sure of myself here but I seem to recall something
along these lines).
------
S.O.S.
On 9 Apr 2008, at 9:31 pm, email@hidden wrote:
Dear All
I am trying to set the background colour of a range of text in
textview to a color with an alpha value less than 1.
I get the text storage and set its NSBackgroundColorAttributeName
attribute (through NSMutableAttributedString calls) to a colour
with an alpha value less than 1.
However when this background draws it draws the colour as solid
and as I decrease the alpha value( towards 0.0 ) the colour goes
towards black.
Any suggestions
Thanks
Fred
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden