• 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
Re: Programmatically adding an NSTextField to an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically adding an NSTextField to an NSTextView


  • Subject: Re: Programmatically adding an NSTextField to an NSTextView
  • From: Keith Bauer <email@hidden>
  • Date: Fri, 7 Feb 2003 08:15:34 +1300

Could it be possible for you to explain what you want to do by adding a NSTextField to a NSTextView (which is not supposed to be a widget container even if it can AFAIK)?

I'm trying to get some standard widgets to flow inline with text.

To do this, I tried making a text attachment with an attachment cell which actually implemented the control, but the control always showed up disabled.

To work around this, I'm using a text attachment which draws nothing itself, but which positions an actual control appropriately. It's in the text attachment's cell's -drawWithFrame:inView: method that I'm repositioning the control and adding it to the NSTextView. Pop-up buttons work fine with this method, but text fields are giving me headaches :(

I want to add the controls to the NSTextView because it's inside an NSScrollView, and I'd like to have the controls scroll with the text. The text view is also the view that comes in the inView: parameter to the draw method, and it seems that this is the logically appropriate place to add the control.

Better suggestions welcomed ;)

-Keith
_______________________________________________
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.

  • Follow-Ups:
    • Re: Programmatically adding an NSTextField to an NSTextView
      • From: email@hidden
References: 
 >Re: Programmatically adding an NSTextField to an NSTextView (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: drag and drop sample is incorrect: it does not use the pasteboard contents
  • Next by Date: Re: NSLayoutManager question
  • Previous by thread: Re: Programmatically adding an NSTextField to an NSTextView
  • Next by thread: Re: Programmatically adding an NSTextField to an NSTextView
  • Index(es):
    • Date
    • Thread