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

Re: setAccessoryView


  • Subject: Re: setAccessoryView
  • From: Jeremy Dronfield <email@hidden>
  • Date: Thu, 13 May 2004 09:56:33 +0100

On 13 May 2004, at 12:23 am, Eric Long wrote:

Did you set the view in IB to be resizable? If so, try setting it to
non-resizable (i.e. all solid struts). This is how I have my accessory
views set up, and they expand to fit the panel.

Are you doing anything else that might effect this? I tried your
suggestion, but it didn't work for me.

No, I'm not doing anything special. For example, I have one accessory which is used in a method -saveClearCopy:. The accessory view is an NSView in a nib by itself, the nib being owned by my main controller. In the Size section of the IB inspector, all the struts (inside and outside the central square) are straight. The method which loads the nib and runs the panel is as follows:

- (IBAction)saveClearCopy:(id)sender
{
if (!saveCopyAccessoryView) {
if (![NSBundle loadNibNamed:@"SaveAccessory" owner:self]) {
NSLog(@"Failed to load RichTextDocumentFormatAccessory.nib");
return;
}
}
NSSavePanel *saveSheet = [NSSavePanel savePanel];
[saveSheet setCanCreateDirectories:YES];
[saveSheet setCanSelectHiddenExtension:YES];
[saveSheet setAccessoryView:saveCopyAccessoryView];
[self saveCopyFormatChanged:saveCopyFormatPopup];
[saveSheet beginSheetForDirectory:nil file:@"untitled" modalForWindow:mainWindow modalDelegate:self didEndSelector:@selector(didEndSaveClearSheet:returnCode:contextInfo:) contextInfo:nil];
}

When saveSheet is resized, the accessory view resizes with it. No notification handler, nothing special. I don't know why it isn't working for you...

Regards,
-Jeremy
_______________________________________________
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.


References: 
 >Re: setAccessoryView (From: Eric Long <email@hidden>)

  • Prev by Date: Re: How to share data between application and Printing Plug-In Module?
  • Next by Date: Resizing NSImageView and its image
  • Previous by thread: Re: setAccessoryView
  • Next by thread: Re: setAccessoryView
  • Index(es):
    • Date
    • Thread