Key windows, Main windows, !@#.
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.