Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jcl43

macrumors newbie
Original poster
Mar 9, 2008
21
0
Hi all I have a question about putting still images on a GUI just for looks. Is there a recommended way to do this? I tried using IKImageView but could not get the surrounding box to be the same size as the image. Is NSImageWell recommended? Thanks for any input!
 

jcl43

macrumors newbie
Original poster
Mar 9, 2008
21
0
Nevermind I figured it out...thanks to all anyways

need to set it to crop when trying to resize....not very intuitive in my opinion but hey
 

jcl43

macrumors newbie
Original poster
Mar 9, 2008
21
0
edit: OK that is not working for me (using IKImage) It builds but exits immediately with status = 5.

Does anyone know the correct way to simply display an image on a GUI window? Thanks again.
 

jcl43

macrumors newbie
Original poster
Mar 9, 2008
21
0
Ok this is where I am at

Header:

IBOutlet NSImageView *imageView;


Source:

NSImage *imageFromBundle = [NSImage imageNamed:mad:"sensorfinal-1.jpg"];
[imageView setImage: imageFromBundle];
[imageView setEditable: NO];

This should set the image right? If I set editable to YES then I can drag the image into the cell no prob, but it wont initialize with the image....
 

jcl43

macrumors newbie
Original poster
Mar 9, 2008
21
0
Just wondering if anyone has an idea why this isnt working...thanks!
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
Drag an image to the project window to include it to your project. Then, open Interface Builder and drag the image from the available images onto the GUI. This will automatically create what you want.
 

jcl43

macrumors newbie
Original poster
Mar 9, 2008
21
0
Ahhh....thanks so much. I cant believe it took me 2 days to figure that out.

Thanks again!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.