• 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
One line NSTextFieldCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

One line NSTextFieldCell


  • Subject: One line NSTextFieldCell
  • From: Julien Guimont <email@hidden>
  • Date: Sat, 12 Jul 2003 01:37:22 -0400

Hello,

I made a subclass of NSTextFieldCell to mimic the new panther Finder selection style in one of my app. It works great, but one thing I can't explain: writing a string bigger than its size makes it change line ( and not scrolling it the to left as it should do).

Perhaps, you can explain me what I am doing wrong. Here is some code:

-(void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent
{
mIsEditing = TRUE;
[self changeToFitRect:&aRect];
[super editWithFrame:aRect inView:controlView editor:textObj delegate:anObject event:theEvent];
}
- (void)endEditing:(NSText *)textObj
{
mIsEditing = FALSE;
[super endEditing:textObj];
}

- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {

(...)
[self changeToFitRect:&cellFrame];
[super drawInteriorWithFrame:cellFrame inView:controlView];
}

Thank you!

Julien Guimont
www.juggysoft.com
_______________________________________________
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.

  • Prev by Date: Re: Application hides during processing
  • Next by Date: Re: Dictionaries in IB
  • Previous by thread: Re: Any Cocoa developer in the LA area?
  • Next by thread: Text: expand certain characters during editing, but still treat as single chars?
  • Index(es):
    • Date
    • Thread