One line NSTextFieldCell
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.