• 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
my first custom view (problems)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

my first custom view (problems)


  • Subject: my first custom view (problems)
  • From: Frank Fenn <email@hidden>
  • Date: Tue, 18 Mar 2003 16:27:25 -0700

Hi all,

I've started to play around with a simple custom view. I have an interface with a text field and
right from it a custom view with the dimensions 310 x 150.

The only method I've implemented so far is:

-(void) drawRect:(NSRect)rect
{
NSLog(@"%f %f",rect.size.width,rect.size.height);

// draw border

NSDrawGroove(rect,rect);
}

When the window is created the border is drawn and the size reported is 310 x 150. Now I enter
something in the text field and make the window inactive. Another border is drawn in my custom
view with the dimensions 310 * 25 !!!??? What's going on here? 25 is exactly the height of the
text field. If I add another text field below the first one and repeat the procedure a border is drawn
on my custom view which matches exactly the lower edge of the second text field. Any Ideas?

--

regards
Frank Fenn - Bright Light Software
_______________________________________________
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: my first custom view (problems)
      • From: publiclook <email@hidden>
References: 
 >Determining cumulative size of an object at runtime (From: Steven Frank <email@hidden>)

  • Prev by Date: NSPopUpButton fixed
  • Next by Date: Re: data access framework after all?
  • Previous by thread: Determining cumulative size of an object at runtime
  • Next by thread: Re: my first custom view (problems)
  • Index(es):
    • Date
    • Thread