NSMatrix

muqaddarmuqaddar Administrateur
22:24 modifié dans API AppKit #1
Salut les jeunes,

Je cherche un tutoriel sur NSMatrix, j'ai rien trouvé dans nos liens. :(
Si quelqu'un a une adresse...  :D

Réponses

  • mpergandmpergand Membre
    22:24 modifié #2
    Désolé d'avoir squatté ton sujet :)

    J'ai trouvé ça:
    <br />Grouping image buttons in a matrix (e.g. for a thumbnail browser)<br />         <br />         Create a Square Button (NSButton, type: square button) and multiple it          by enlarging its size while selecting ALT-key (the NSMatrix appears in          the info title).<br /><br />      <br /><br />Choose &quot;Layout-&gt;Make subviews of Scroll View&quot; from Menu          to put your ButtonCells into a scroll view.<br /><br />      <br /><br />Define an outlet for your matrix and set the title and image of a cell          of your matrix (assuming that oMatrix is your outlet):<br /><br />      <br /><br />NSCell *cell = [oMatrix          cellAtRow:y column:x];<br />         [NSImage *img=[[[NSImage alloc]<br />         initWithContentsOfFile:&quot;pic.JPG&quot;]autorelease]; <br />         [cell setImage: img];<br />         [cell setTitle: @&quot;My Picture Title&quot;];<br />         [oMatrix display]; <br />         <br />         [oMatrix numberOfColumns] and [oMatrix numberOfRows] will return the number          of rows and columns.<br /><br />      <br /><br /> [oMatrix addRow] and [oMatrix sizeToCells] will add a row and size the          cells to fit.<br />         <br />
    


    La page est ICI
  • muqaddarmuqaddar Administrateur
    22:24 modifié #3
    Merci mpergand, c'ets déjà  un bon début qui m'est fort utile.
    :)
Connectez-vous ou Inscrivez-vous pour répondre.