• 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: dimmed subview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dimmed subview


  • Subject: Re: dimmed subview
  • From: Andy Lee <email@hidden>
  • Date: Mon, 29 Apr 2002 15:18:36 -0400

At 8:09 PM +0200 4/29/02, nicolas berloquin wrote:
My custom view is declared inside its own nib file also, and I load it with loadNibNamed:

I insert my custom view inside a dynamically created NSView that I setup as the setDocumentView of my
NSScrollerView.
I can see the view is drawn (the custom view) when I run my app, but my view remains desperatly "disabled":
everyhing in it is dimmed, buttons, text fields etc...

I just managed to drop a custom view (from a separate nib, like yours) into an NSScrollView -- but without the intermediate dynamically created NSView. The controls in my custom view seem to work fine. Well, at least they aren't dimmed. I haven't tried hooking them up to anything. I do have a problem with scrollbars not being updated correctly, but that's probably a coding error on my part.

When I add that extra subview level, I don't see my custom view at all; I don't know if this is related to your problem, or if I just made a coding error.

If you'd like to compare notes, here's what I did:

* To create the NSScrollView in my main nib file: dragged a CustomView onto a window and selected Layout -> Make subviews of -> Scroll View. Connected my test object to the scroll view using a "myScrollView" outlet.

* To create the custom view: created a new nib file called "Other" with a single window containing my custom view, assembled with drag-and-drop in the obvious way. In Other.nib, specified my test class as the class of the File's Owner, and connected a "myCustomView" outlet to the custom view.

* To put the custom view in my scroll view (without the intermediate NSView):

[NSBundle loadNibNamed:@"Other" owner:self];
[myCustomView removeFromSuperview];
[myScrollView setDocumentView:myCustomView];

--Andy
_______________________________________________
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.

  • Follow-Ups:
    • Re: dimmed subview
      • From: nicolas berloquin <email@hidden>
References: 
 >dimmed subview (From: nicolas berloquin <email@hidden>)

  • Prev by Date: CodeBase for Mac OS X
  • Next by Date: Re: Database Engine
  • Previous by thread: dimmed subview
  • Next by thread: Re: dimmed subview
  • Index(es):
    • Date
    • Thread