Create buttons from pictures

Discussion in 'Mac Programming' started by Blakeasd, Feb 2, 2011.

  1. Blakeasd macrumors 6502a

    Joined:
    Dec 29, 2009
    #1
    Hello.
    I was looking through the ios resources and I wanted to recreate the buttons. I noticed however the buttons are split into 2 parts left and right. My question is how do I stich the two buttons together. Is it programatic. I really want to use the buttons apple created.
    (The buttons are for a mac program I am working on -- Not IOS)

    Thanks
     
  2. whooleytoo macrumors 603

    whooleytoo

    Joined:
    Aug 2, 2002
    Location:
    Cork, Ireland.
    #2
    If I understand you correctly - you want to use a Segmented control (NSSegmentedControl). You can add them to your window programmatically or in Interface Builder.
     
  3. Blakeasd thread starter macrumors 6502a

    Joined:
    Dec 29, 2009
    #3
    I am trying to create a button, not a segmented control. I am trying to use two images, a right image, and a left. How can I stich these two together to make one button.
     
  4. PatrickCocoa macrumors 6502a

    Joined:
    Dec 2, 2008
    #4
    I don't understand your question

    I don't understand where you're starting from or what it is you want to do.
     
  5. Blakeasd thread starter macrumors 6502a

    Joined:
    Dec 29, 2009
    #5
    I was looking through the resources of an Apple app. I wanted to recreate on of the buttons. The button's image was split into 2 parts. A left part and a right part. I think apple draws the middle of the button so it fits together. Can someone help me do this? Here is a picture of the two parts.

    http://i1107.photobucket.com/albums/h386/Blakeasd/Screenshot2011-02-03at73318PM.png


    As you can see from the screenshot there are two parts to the button. I think Apple draws the Middle of it, how do I do this?

    Please Help
    Thanks
     
  6. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #6
    There should be a third part which fills the remainder of the button.

    Take a look at NSDrawThreePartImage()
     
  7. Blakeasd thread starter macrumors 6502a

    Joined:
    Dec 29, 2009

Share This Page