Still no luck. When I switch off the background of the scrollview the gray of the window in my test project comes through so it is clear all backgrounds are not being drawn but the selection colour still behaves in exactly the same way and draws in a solid colour.

Thanks
Fred


On 9 Apr 2008, at 16:08, Robert Napier wrote:

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 PROTECTED] 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 PROTECTED] 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 (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/graham.cox%40bigpond.com

This email sent to [EMAIL PROTECTED]






_______________________________________________

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/robnapier %40gmail.com

This email sent to [EMAIL PROTECTED]


Reza Farhad
-------------------------------------------
Urban Design Limited
[EMAIL PROTECTED]
+44 (0)7795 430094




_______________________________________________

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