Hi,
I would like to customize the text layout in some of my nstextfields. Normally, the fields are just one line but they wrap text and if more than one line is being used, they grow vertically to display all the text. This hasn't been too difficult to implement (thanks to sample code found on the Internet and in Apple's documentation).
However, I would like the lines after the first to be automatically indented when the user types, to visually indicated that it is only one text field (I have a number of them arranged in an nxm grid). I'm not sure how to go about doing this.
I've been going through Apple's Text Layout Programming Guide but to be honest am a little overwhelmed. There's lots of information there that doesn't seem to exactly address what I need, and other information that seems to be more or less what I'm looking for but without the nitty-gritty details or any examples. For that, I realize I need to delve into the class documentation, and I've been looking at NSTypesetter/NSATSTypesetter and NSLayoutManager, but it's still not clear to me exactly what to do.
My rough idea of what will need to be done is as follows:
Replace the field editor for my nstextfields with a custom NSTextView subclass, which will be hooked up to a subclass of NSLayoutManager. And I may need a custom NSATSTypesetter for the layout manager.
Am I on the right track here? If so, could someone please point me towards the exact methods I will need to override in my subclasses? If anyone's done anything like this I'd appreciate your input. I know I should just charge ahead and start trying to configure things and play around, but I thought a little guidance might save me some time.
Thanks,
parsec