Re: NSTextField, drawing the text offset to the right in the field

2009-09-30 Thread Matt Neuburg
Although, to be clear, you *can* do this is in code, just not the way you were doing it. You have to make sure you're talking to this instance at the right moment, i.e. before the window appear but after the instance (the text field) has been assembled by the nib. That moment, of course, is

Re: NSTextField, drawing the text offset to the right in the field

2009-09-29 Thread jon
i've got something i think is close... i've got a custom cell, and a custom textfield, i've got an override implementation of drawInteriorWithFrame that i think will work. but i'm confused as to where to call drawInteriorWithFrame, right now it is inside the custom Cell, but the

Re: NSTextField, drawing the text offset to the right in the field

2009-09-29 Thread Matt Neuburg
On or about 9/29/09 4:43 PM, thus spake jon trambl...@mac.com: is properly using my custom textfield, but the custom textfield doesn't appear to be using the custom cell Then you have to *make* the custom textfield use the custom cell. :) Use whips and chains if necessary. Actually, I think

Re: NSTextField, drawing the text offset to the right in the field

2009-09-29 Thread jon
hmmm, well i'm trying hard to do it...here is what i've done... in a header: IBOutlet ImageTextField *addressBar; i've created this pointer to this instance... and then in the awakefromNib method, i have this... [ImageTextField setCellClass:[ImageTextFieldCell class]]; this set's the

Re: NSTextField, drawing the text offset to the right in the field

2009-09-29 Thread Kyle Sluder
+setCellClass: just tells the view Hey next time you initialize yourself, make a cell of this class. Since your ImageTextField instance was created inside of IB, this is never going to happen. Instead you need to change the class of the cell from within IB, under the Identity inspector. It might

Re: NSTextField, drawing the text offset to the right in the field

2009-09-29 Thread jon
ahh, that was it, thanks a lot, that made perfect sense once i looked inside IB I was also surprised that IB knew about my custom cell class... I was thinking code code code... and i just needed that shove in the correct direction... you made my day, after a very long day...

Re: NSTextField, drawing the text offset to the right in the field

2009-09-28 Thread Matt Neuburg
On Mon, 28 Sep 2009 19:37:00 -0600, jon trambl...@mac.com said: i've got a textfield defined... but i don't want to draw the text that is in the field right up against the left boarder of the bounding box of this defined field in IB, I want to start the text like 20 pixels to the right of the