• 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
Key windows, Main windows, !@#.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Key windows, Main windows, !@#.


  • Subject: Key windows, Main windows, !@#.
  • From: Nico <email@hidden>
  • Date: Tue, 13 Aug 2002 15:18:49 +0200

Hi :>

I've got a little problem with the key and main windows management.
My application uses many Documents. Each document contains 1 window. I need
this window to be the main window, that's to say (I think) to have an active
behaviour : the title bar and the scrool bar must be both active. These
windows contain NSTextView which are not editable, but selectable.
At the same time, I've got an NSPanel (only one in the app, not one for each
document) and I want it to be the -KEY- window, that's to say to catch the
text I type (this panel contains an NSTextField.)
Well.. I couldn't manage to do that simply with -makeKeyWindow...

I also tried to add this code in -windowDidBecomeMain :
[myPanel makeKeyWindow];
[myTextField selectText:0];
[[myPanel fieldEditor:NO forObject: myTextField] setSelectedRange:
NSMakeRange([(NSString *)[myTextField stringValue] length], 0)];

It works fine...but the main window's scroll bar becomes inactive.


Do you have any ideas ?
Thanks. Nico.
_______________________________________________
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.

  • Prev by Date: Re: Repeating images for use as a background?
  • Next by Date: Partially select texts in NSTextField
  • Previous by thread: Re: Repeating images for use as a background?
  • Next by thread: Re: Key windows, Main windows, !@#.
  • Index(es):
    • Date
    • Thread