Support for PNG graphics in TsListBox?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34786
    IPSteven
    Participant

    Can TsListBox use PNG images with support for alpha transparency?

    I am wondering if TsListBox has this feature and if so how to use it.

    Thanks,

    …Steven

    #46719
    Support
    Keymaster

    Hello Steven

    Of course, PNG may be shown on items manually in the OnDrawItem event.

    For a drawing of 32-bit bitmaps you can use the CopyByMask procedure. This procedure is implemented in the sGraphUtils module.

    Example :

    Code:
    CopyByMask(DstRect, SrcRect, DstBmp, SrcBitmap, EmptyCI, False);

    Also, the TPNGGraphic object have own Draw(ACanvas: TCanvas; const Rect: TRect) procedure.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.