On Sun, May 31, 2009 at 9:37 PM, Andy Lee wrote:
> On May 31, 2009, at 8:51 AM, Uli Kusterer wrote:
>
> Another approach would be to try changing the class of your content view in
> Interface builder. Simply click the background of the window, that should
> show the content view in the inspector.
On May 31, 2009, at 8:51 AM, Uli Kusterer wrote:
Another approach would be to try changing the class of your content
view in Interface builder. Simply click the background of the
window, that should show the content view in the inspector. Go to
the "Identity" tab and change the class to NSIm
Am 30.05.2009 um 19:45 schrieb cocoa learner:
Yah Andy and Michael you all were right. But still I have some
problem.1>.
While resizing the window Image is not getting resized.
You could probably fix that using setImageScaling: on the image view.
2>. My controls (NSButton and NSTextField)
No, the conclusion is : That _is_ the easy and straight way to do it.
Subclassing is your power and friend, my friend. Once you understand
what those lines actually do, you should have a different point-of-view.
"Embrace the subclass, for they know what they are doing." :-)
gary
On May 30,
Ok. Let me try this.So conclusion is there is no easy and straight way to do
it. Have to subclass NSView.
Thanx Michael.
Cocoa.learner
On Sun, May 31, 2009 at 1:12 AM, Michael Vannorsdel wrote:
> You'd really be better off making an NSView subclass and having it draw the
> image you want in draw
You'd really be better off making an NSView subclass and having it
draw the image you want in drawRect:.
- (void)awakeFromNib
{
myImage = [[NSImage alloc] init
[self setNeedsDisplay:YES];
}
- (void)drawRect:(NSRect)rect
{
NSSize isize = [myImage size];
[myImage dr
rce:@"winImg" ofType:@"png"];
>>
>> NSLog(@"AppController::init : Image file path : %@", path);
>>
>> NSImageView *winContent = [[NSImage alloc] initWithContentsOfFile:path];
>>
>> [ appWindow setContentView: winContent];
>>
oa.learner.
On Tue, May 26, 2009 at 11:12 PM, Nick Zitzmann
wrote:
On May 26, 2009, at 11:04 AM, cocoa learner wrote:
How to draw background image in my app window?
You could change the window's content view using -setContentView:
to a view
that will draw a background image,
the image in back ground of my app
window.
Am I doing any thing wrong in this code?
Regards
Cocoa.learner.
On Tue, May 26, 2009 at 11:12 PM, Nick Zitzmann
wrote:
On May 26, 2009, at 11:04 AM, cocoa learner wrote:
How to draw background image in my app window?
You could change the win
ong in this code?
Regards
Cocoa.learner.
On Tue, May 26, 2009 at 11:12 PM, Nick Zitzmann wrote:
>
> On May 26, 2009, at 11:04 AM, cocoa learner wrote:
>
> How to draw background image in my app window?
>>
>
> You could change the window's content view using -setC
On May 26, 2009, at 11:04 AM, cocoa learner wrote:
How to draw background image in my app window?
You could change the window's content view using -setContentView: to a
view that will draw a background image, such as NSImageView... Of
course, if you have any other controls in the co
Hi all,
How to draw background image in my app window?
I have found a way but not sure whether that's correct. So here is my way of
doing -
1>. Get a window from IB Library.
2>. Drag NSImage item from IB Library on window.
3>. Make it the size of window.
4>. Now drag and drop t
12 matches
Mail list logo