Display a photo in a ListBox??? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Display a photo in a ListBox???

Hello,

Anybody know if it is possible to display an image (photograph) as a background in a listbox? I tried loading an image to an image component and placing the component over the Listbox. The Image was set to Transparent:=True but this did nothing. I would like to be able to use a photograph as a Listbox background but have it dimmed so it doesn't interfere with viewing the items in the Listbox. If anybody has any ideas I would greatly appreciate it.

Thanks,

Guy

Comments

  • zibadianzibadian Posts: 6,349Member
    : Hello,
    :
    : Anybody know if it is possible to display an image (photograph) as a background in a listbox? I tried loading an image to an image component and placing the component over the Listbox. The Image was set to Transparent:=True but this did nothing. I would like to be able to use a photograph as a Listbox background but have it dimmed so it doesn't interfere with viewing the items in the Listbox. If anybody has any ideas I would greatly appreciate it.
    :
    : Thanks,
    :
    : Guy
    :
    :
    Try painting the image on the TListBox.Canvas. You might need to assign an event to the OnDrawItem() for it to work correctly.
  • guybryantguybryant Posts: 2Member
    : : Hello,
    : :
    : : Anybody know if it is possible to display an image (photograph) as a background in a listbox? I tried loading an image to an image component and placing the component over the Listbox. The Image was set to Transparent:=True but this did nothing. I would like to be able to use a photograph as a Listbox background but have it dimmed so it doesn't interfere with viewing the items in the Listbox. If anybody has any ideas I would greatly appreciate it.
    : :
    : : Thanks,
    : :
    : : Guy
    : :
    : :
    : Try painting the image on the TListBox.Canvas. You might need to assign an event to the OnDrawItem() for it to work correctly.
    :

    Well I tried this and it sort of worked. Some problems were:
    1) No photo if the list box is empty. The photo will only show on lines in the list box. If the list box is 1/2 full only 1/2 picture shows.
    2) Don't know how to make the photo dim - it is bright and almost obscures the items in the list box.
    Any Suggestions out there?
    Thanks in advance if you have any ideas.
    Guy
Sign In or Register to comment.