Ariel Barreiro wrote:
> 
> Does anyone has a sample code, or some kind of example on how to use the
> drawing of each item. I would need to know if it is possible to draw some
> items of the list with one font and some others with a different one.
> 
> I hope somebody would be able to help me. Thank you very much for
> everything.

   Here's something I used to draw a small icon next to each list
choice.  Note the CALLBACK_PROLOGUE/EPILOGUE because I was using
GCC.  If you're using CodeWarrior you won't need those two macros.

Regards,
Daniel.

static void ListDrawPatterns(Word itemNum, RectanglePtr bounds, CharPtr
*itemsText) {
   RectangleType spot = {{bounds->topLeft.x, bounds->topLeft.y + 1},
      {ListPatternSize,   ListPatternSize}};

   CALLBACK_PROLOGUE   // see callback.h

   WinSetPattern(cardPattern[itemNum + PatternGray]);
   WinFillRectangle(&spot, 0);
   WinDrawRectangleFrame(rectangleFrame, &spot);

   WinDrawChars(itemsText[itemNum], StrLen(itemsText[itemNum]),
bounds->topLeft.x + 12, bounds->topLeft.y);

   CALLBACK_EPILOGUE   // see callback.h
}

Reply via email to