How to insert a transparent picture into a ListView 
Author Message
 How to insert a transparent picture into a ListView

I've several pictures with a transparent background in an ImageList. In
the ImageList their backgrounds are transparent but if I insert the
pictures into a ListView their background color isn't transparent
anymore.

  Dim ListView_Item As ListItem

  Set ListView_Item = MyListView.ListItems.Add
  ListView_Item.SmallIcon = "Picture1"
  ListView_Item.ListSubItems.Add.Text = "This is picture 1"

  Set ListView_Item = MyListView.ListItems.Add
  ListView_Item.SmallIcon = "Picture2"
  ListView_Item.ListSubItems.Add.Text = "This is picture 2"

Does anyone has any idea how I can make the background color also
transparent in a ListView?
Stefan



Mon, 11 Apr 2005 14:26:53 GMT  
 How to insert a transparent picture into a ListView
The simplest way is to use icons in your imagelist control - not bitmaps

--
Richard Allsebrook
Applications and Web Development


Quote:
> I've several pictures with a transparent background in an ImageList. In
> the ImageList their backgrounds are transparent but if I insert the
> pictures into a ListView their background color isn't transparent
> anymore.

>   Dim ListView_Item As ListItem

>   Set ListView_Item = MyListView.ListItems.Add
>   ListView_Item.SmallIcon = "Picture1"
>   ListView_Item.ListSubItems.Add.Text = "This is picture 1"

>   Set ListView_Item = MyListView.ListItems.Add
>   ListView_Item.SmallIcon = "Picture2"
>   ListView_Item.ListSubItems.Add.Text = "This is picture 2"

> Does anyone has any idea how I can make the background color also
> transparent in a ListView?
> Stefan



Mon, 11 Apr 2005 16:03:58 GMT  
 How to insert a transparent picture into a ListView
Hi Richard

Thanks a lot, this works great, but I use in one of my ImageLists custom
size (Height: 20 / Width: 10).
How can I create an icon with the size 20x10?

Stefan

Quote:

> The simplest way is to use icons in your imagelist control - not bitmaps

> --
> Richard Allsebrook
> Applications and Web Development



> > I've several pictures with a transparent background in an ImageList. In
> > the ImageList their backgrounds are transparent but if I insert the
> > pictures into a ListView their background color isn't transparent
> > anymore.

> >   Dim ListView_Item As ListItem

> >   Set ListView_Item = MyListView.ListItems.Add
> >   ListView_Item.SmallIcon = "Picture1"
> >   ListView_Item.ListSubItems.Add.Text = "This is picture 1"

> >   Set ListView_Item = MyListView.ListItems.Add
> >   ListView_Item.SmallIcon = "Picture2"
> >   ListView_Item.ListSubItems.Add.Text = "This is picture 2"

> > Does anyone has any idea how I can make the background color also
> > transparent in a ListView?
> > Stefan



Tue, 12 Apr 2005 00:29:57 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. WMF handle to insert picture into picture control

2. insert picture box inside picture box

3. Making a picture's background transparent

4. Transparent Picture Box

5. How to have transparent text label on top of picture box

6. Transparent Picture

7. Transparent backgrounds on picture objects

8. overlaying a transparent image onto a picture box

9. I Want To Make A Textbox with a transparent background, because of a picture

10. Print transparent picture to Printer

11. Form transparent with picture appeared

12. Transparent backgrounds on picture objects

 

 
Powered by phpBB® Forum Software