Custom field editor to emulate LocationTextField (as in Safari) ?
Custom field editor to emulate LocationTextField (as in Safari) ?
- Subject: Custom field editor to emulate LocationTextField (as in Safari) ?
- From: ruffnex <email@hidden>
- Date: Thu, 18 Mar 2004 15:34:19 +0800
Hi,
I'm trying to subclass NSTextField so that it can take a value to show
progress. This is like the location text field in Safari, where on
loading a web page, the location text field becomes a progress bar.
Safari has its own class called LocationTextField.
What's the best approach? Currently I am trying to:
1. subclass NSTextField
2. subclass NSTextFieldCell
3. subclass NSTextView (use this as my field editor, and add an
instance variable to hold the progress value, and override drawing
methods to draw a suitably sized rectangle)
However, I am failing even to add my subclassed NSTextView, as a text
field editor of my text field cell. On running, my text field appears,
but it has no editor.
Any tips on correct usage of...
NSTextFieldCell:
- (NSText *)setUpFieldEditorAttributes:(NSText *)textObj
NSWindow:
- (NSText *)fieldEditor:(BOOL)createFlag forObject:(id)anObject
- (id)windowWillReturnFieldEditor:(NSWindow *)sender
toObject:(id)anObject
Thanks,
Simon
_______________________________________________
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.