FROM : Michael Becker
DATE : Thu Dec 09 11:52:10 2004
Am 08.12.2004 um 19:02 schrieb John C. Randolph:
> I would just send it a "setAutoresizingMask:(NSViewWidthSizable |
> NSViewHeightSizable)" message.
Doesn't work either. I've set up a sample app which has a "container"
view (NSBox) and a "child" view (NSView). Actually, I overrode NSView
to paint the view in blue so I could see whether it resizes. Here is
the complete code of the project:
In AppController:
- (void)awakeFromNib {
[ view setAutoresizingMask:(NSViewHeightSizable | NSViewWidthSizable)];
[ container addSubview:view];
}
In the NSView subclass:
- (void)drawRect:(NSRect)rect {
[[NSColor blueColor] set];
NSRectFill([self frame]);
[super drawRect:rect];
}
In IB, *every*thing is set to be resizable (NSViewHeightSizable |
NSViewWithSizable). But when I run the application, the subview (in
blue) does not resize. It just sticks to the bottom left corner of the
NSBox.
Is this a bug or am I missing a simple point?
Kind regards,
Michael
DATE : Thu Dec 09 11:52:10 2004
Am 08.12.2004 um 19:02 schrieb John C. Randolph:
> I would just send it a "setAutoresizingMask:(NSViewWidthSizable |
> NSViewHeightSizable)" message.
Doesn't work either. I've set up a sample app which has a "container"
view (NSBox) and a "child" view (NSView). Actually, I overrode NSView
to paint the view in blue so I could see whether it resizes. Here is
the complete code of the project:
In AppController:
- (void)awakeFromNib {
[ view setAutoresizingMask:(NSViewHeightSizable | NSViewWidthSizable)];
[ container addSubview:view];
}
In the NSView subclass:
- (void)drawRect:(NSRect)rect {
[[NSColor blueColor] set];
NSRectFill([self frame]);
[super drawRect:rect];
}
In IB, *every*thing is set to be resizable (NSViewHeightSizable |
NSViewWithSizable). But when I run the application, the subview (in
blue) does not resize. It just sticks to the bottom left corner of the
NSBox.
Is this a bug or am I missing a simple point?
Kind regards,
Michael
| Related mails | Author | Date |
|---|---|---|
| Michael Becker | Dec 7, 03:06 | |
| Michael Becker | Dec 7, 17:58 | |
| Ricky Sharp | Dec 7, 18:30 | |
| Michael Becker | Dec 8, 11:24 | |
| John C. Randolph | Dec 8, 19:02 | |
| Michael Becker | Dec 9, 11:52 | |
| Louis C. Sacha | Dec 9, 14:26 | |
| Michael Becker | Dec 9, 15:14 |






Cocoa mail archive

