Re: Text fields doesn't draw in a custom view
Re: Text fields doesn't draw in a custom view
- Subject: Re: Text fields doesn't draw in a custom view
- From: Ivan Myrvold <email@hidden>
- Date: Sun, 19 May 2002 14:57:00 +0200
I somehow succeeded in being able to write something in the text view,
by forcing it to be first responder, with the following:
[[self window] makeFirstResponder:omytextfield]
I then am able to click inside the NSTextField, it shows the white
background of the text field, and I can see what I writes. But as soon
as I click outside the text field, it disappears again.
But this is not a good solution.
Ivan
Pe sxndag, 19. mai 2002, kl. 12:59, skrev Ivan Myrvold:I have printed
out the view hierarchy below, if that can be of help:
(gdb) po [oscrollView subviews]
(<NSClipView: 0x3537710>, <NSScroller: 0x3507b70>, <NSScroller:
0x34d6c10>)
(gdb) po omyview
<NSView: 0x384ff00>
(gdb) po omytextfield
<NSTextField: 0x3811660>
(gdb) po [0x3811660 superview]
<NSView: 0x384ff00>
(gdb) po [omytextfield superview]
<NSClipView: 0x3537710>
Ivan
Pe sxndag, 19. mai 2002, kl. 12:50, skrev Ivan Myrvold:I have a fairly
complicated view hierarchy, in a nib file.
I have a window with a custom view, contained in an NSScrollView..
I have a view defined in that nib file consisting of an NSImageView,
and some NSTextField's dropped on top of that.
In my code, I am setting the view in the window with the call:
[oscrollView setDocumentView:omyview]
[omyview scrollPoint:punkt] // just to scroll the view to the top
The window is showing the image contained in the "omyview" NSImageView
just fine, but the text fields on top of that view doesn't show at
all, although by hovering the cursor over where the text fields are
supposed to be, changes the cursor to the correct icon (I-beam, or
whatever it's called). So the text fields are there, but why doesn't
they show up. Clicking inside the text fields only results in an alert
sound.
I have put the text fields in front with the "Bring to front" command
in the IB's Layout menu, and connected all the outlets.
Ivan
_______________________________________________
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.
Ivan C Myrvold
OrtopediService AS
Mob. 913 16 356
Tlf. 38 14 45 93
_______________________________________________
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.