• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Text with translucent Background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text with translucent Background


  • Subject: Re: Text with translucent Background
  • From: email@hidden
  • Date: Wed, 9 Apr 2008 16:28:26 +0100

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@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:
@gmail.com


This email sent to email@hidden


Reza Farhad ------------------------------------------- Urban Design Limited email@hidden +44 (0)7795 430094




_______________________________________________

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


  • Follow-Ups:
    • Re: Text with translucent Background
      • From: Douglas Davidson <email@hidden>
References: 
 >Text with translucent Background (From: email@hidden)
 >Re: Text with translucent Background (From: Graham Cox <email@hidden>)
 >Text with translucent Background (From: email@hidden)
 >Re: Text with translucent Background (From: Robert Napier <email@hidden>)

  • Prev by Date: Re: core data and IB outlet binding
  • Next by Date: Re: fileHFSCreatorCode & fileAttributesAtPath:traverseLink on app bundles
  • Previous by thread: Re: Text with translucent Background
  • Next by thread: Re: Text with translucent Background
  • Index(es):
    • Date
    • Thread