simple GUI question

Discussion in 'Mac Programming' started by jcl43, Apr 30, 2008.

  1. jcl43 macrumors newbie

    Joined:
    Mar 9, 2008
    #1
    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!
     
  2. jcl43 thread starter macrumors newbie

    Joined:
    Mar 9, 2008
    #2
    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
     
  3. jcl43 thread starter macrumors newbie

    Joined:
    Mar 9, 2008
    #3
    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.
     
  4. jcl43 thread starter macrumors newbie

    Joined:
    Mar 9, 2008
    #4
    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....
     
  5. jcl43 thread starter macrumors newbie

    Joined:
    Mar 9, 2008
    #5
    Just wondering if anyone has an idea why this isnt working...thanks!
     
  6. Soulstorm macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #6
    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.
     
  7. jcl43 thread starter macrumors newbie

    Joined:
    Mar 9, 2008
    #7
    Ahhh....thanks so much. I cant believe it took me 2 days to figure that out.

    Thanks again!
     

Share This Page