Thread: Listview control

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    98

    Listview control

    I am looking for a listview control similar to C# 2005 Express's built-in one, but that displays larger icons. I need it to display the icons about the same size as on the windows desktop.
    Does anyone know where if something like this exists, and where I can download it?
    Thanks.

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    It does in Large icon mode.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    98
    I tried that but it doesnt make the icons any larger. I tried making the image itself bigger, but it still displays them very small, about 10x15 pixels.

  4. #4
    Registered User
    Join Date
    Nov 2007
    Location
    Brisbane, Australia
    Posts
    7
    Have you tried creating an instance of the ImageList class with your large icons as the collection?

    You could then set this as the ImageList for the Listview's LargeImageList property.

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    98
    I did that but it still shows small icons. Maybe thats its proper size, but it looks very small to me, and its the same size as the small images in the listview. Isn't there another control I can download that shows the icons in their proper size? I want to use it to create a windows explorer-like interface, thats why I need the large icons.

  6. #6
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    1) Create an ImageList object
    2) Set the ImageSize to 64x64 or whatever <-- this is probably what you missed
    3) Set the ColorDepth to 32bit
    4) Add the desired Images (or add dynamically at runtime)
    5) Create a ListView object
    6) make sure View is set to LargeIcon (usually is by default)
    7) Set the LargeImageList to the image list created above
    8) Add the desired Items (or add dynamically at runtime)

    The images added will all be resized to the size you set above, regardless of their original size
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    98
    Awesome, it works! Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  2. A few questions on ListView Control...
    By Devil Panther in forum Windows Programming
    Replies: 0
    Last Post: 09-05-2003, 02:33 PM
  3. Edit control on listview
    By knutso in forum Windows Programming
    Replies: 5
    Last Post: 08-10-2003, 09:11 PM
  4. ListView Control...
    By Devil Panther in forum Windows Programming
    Replies: 7
    Last Post: 07-12-2003, 11:33 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM