CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Posts
    2

    ListView / ListBox

    I am looking for a list where I could include at least two collumns of text and one with icons, let's say in the third row. I don't need different collumns.
    What's the best way to do this. I couldn't load a picture/icon to a ListView.

    Thanks


  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: ListView / ListBox


    You can load a picture or icon to a ListView. It involves playing around with API. But you can add icons to Listview's First Column only (in report mode ofcourse). Then you can reposition your columns, (if the Common Dialog ver > 4.71 or something). So that you can get your icons column at the 3rd position.

    Simpler would be to use MSFlexGrid. If you set NoGridLines and no fixed columns, it looks much like an List. You can set the Picture property for any cell with .CellPicture=xx

    RK

  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: ListView / ListBox

    Hi Ravi

    You can display icons for the Sub-Items in a listview. I wrote code to do this about 18 months ago, but can't find it anywhere (must be on my old PC). However, Randy Birch has an example at :

    http://www.mvps.org/vbnet/code/comct...itemimages.htm - although you'll need to dig around on the site to get the rest of the code for the example.



    Chris Eastwood

    CodeGuru - the website for developers
    http://www.codeguru.com/vb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured