• 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: code for drawing an NSTextField to a panel window ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: code for drawing an NSTextField to a panel window ...


  • Subject: Re: code for drawing an NSTextField to a panel window ...
  • From: vinai <email@hidden>
  • Date: Thu, 12 Mar 2009 16:41:29 -0700 (PDT)

Hi,

The complete code for the object is attached.  I guess I am still more than a little perplexed why the window itself is being drawn fine, but I can't get any elements (like the text field) drawn to the panel view.

Thanks

--- On Thu, 3/12/09, I. Savant <email@hidden> wrote:

> From: I. Savant <email@hidden>
> Subject: Re: code for drawing an NSTextField to a panel window ...
> To: email@hidden
> Cc: email@hidden
> Date: Thursday, March 12, 2009, 12:00 PM
> On Wed, Mar 11, 2009 at 12:11 PM, vinai
> <email@hidden> wrote:
>
> > where rawButtonRect is an NSRect, contectRect defines
> the panel window I am trying to draw to, and rawTextField is
> of * NSTextField type.  mainPanelView is the view for the
> mainPanel window, and rawTextField is just one of the
> subviews I am trying to add to the that view.  However, the
> window remains plain, and I am at a loss as to what I missed
> ...
>
>   I can't tell, because you didn't include all the
> relevant code.
>
>   How did you create mainPanelView? What is its frame? Who
> is self (I
> suspect it's an NSWindow subclass, but that's an
> odd place to put code
> to build its contents - it'd make more sense to put
> that in a window
> controller if anywhere).
>
> --
> I.S.


      
#import <Cocoa/Cocoa.h>
#import <AppKit/NSPanel.h>
#import "../MiscOperations.h"
#import "MyButton.h"

@interface ControlPanel : NSPanel
{
    NSView           * mainPanelView, * rawTypePopPuSubView,
                                      * reconTypePopUpSubView;

    MyButton          * rawButton,    * mriButton;
    NSRect              rawButtonRect,  mriButtonRect;
    NSArray           * rawArray,     * mriArray;
    NSMenu            * rawMenu,      * mriMenu;
    NSTextField       * rawTextField, * mriTextField;
}

- (id) initWithContentRect: (NSRect) contentRect
                 styleMask: (NSUInteger) windowStyle
                   backing: (NSBackingStoreType) bufferingType
                     defer: (BOOL) deferCreation;
@end

Attachment: ControlPanel.m
Description: Binary data

_______________________________________________

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: code for drawing an NSTextField to a panel window ...
      • From: Jesper Storm Bache <email@hidden>
    • Re: code for drawing an NSTextField to a panel window ...
      • From: Chris Hanson <email@hidden>
References: 
 >Re: code for drawing an NSTextField to a panel window ... (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: using QuickLook from an application?
  • Next by Date: Re: code for drawing an NSTextField to a panel window ...
  • Previous by thread: Re: code for drawing an NSTextField to a panel window ...
  • Next by thread: Re: code for drawing an NSTextField to a panel window ...
  • Index(es):
    • Date
    • Thread