• 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: Getting the background colour for NSBox?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the background colour for NSBox?


  • Subject: Re: Getting the background colour for NSBox?
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 14 Sep 2004 00:36:56 -0400

Andreas Mayer (email@hidden) on Mon, Sep 13, 2004 17:46 said:

>Maybe your text view is inside a scroll view and the scroll view is
>still opaque (not transparent)?

Yes, it was in a scroll view.  I did not notice that IB does this
automatically when you drag an NSTextView to a window.

>No. You select the text view in IB, open the 'Custom Class' pane in the
>inspector and choose your subclass.

Ahhh... i didn't know you could do that, cool.

>> I assume NSColor is lacking a method
>> similar to windowFrameColor but for NSBox?  That would be perfect.
>
>No, it would not. You'd still have to change the color according to the
>background on which you place your view. That's not what you really
>want to achieve. You want the background to be visible through your
>view; so you should make it transparent.

You're right of course.


Anyway, I think I'm giving up on NSTextView!  I moved it out of the
scroll view (which was not obvious how to do either) but then it displays
in the wrong part of the window.  What I really want is an NSTextField,
but since it doesn't support NSLinkAttributeName, I tried using an
NSTextView, but they really aren't that similar.  I'm going to try
subclassing NSTextField I guess. :(

Thanks for your help, I learned several things!



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Getting the background colour for NSBox? (From: Andreas Mayer <email@hidden>)

  • Prev by Date: how to composite NSBezierPath and text on an image
  • Next by Date: Re: Home and end keys and NSTableView, not handled automatically?
  • Previous by thread: Re: Getting the background colour for NSBox?
  • Next by thread: About NSOutlineView's question
  • Index(es):
    • Date
    • Thread