Important alert: (current site time 7/16/2013 2:28:52 AM EDT)
 

winzip icon

custom listview

Email
Submitted on: 3/2/2007 3:07:36 PM
By: Arne Elster 
Level: Intermediate
User Rating: By 43 Users
Compatibility: VB 6.0
Views: 31134
author picture
(About the author)
 
     A list with multiple columns. Multiselect, drag'n'drop item reordering, icons with alpha (LaVolpe's 32bpp dib), checkboxes, simple sorting, own custom styles.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 23 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

3/2/2007 3:16:48 PMDave

Excellent work RM. 5 Stars. Did you get my email/message?
(If this comment was disrespectful, please report it.)

 
3/2/2007 3:25:42 PMCobein

Awesome code man, I found a bug, if you have more than one item ,you can scroll the first item using the mousewheel when the scrollbar is disabled. 5 *
(If this comment was disrespectful, please report it.)

 
3/2/2007 4:08:22 PMRandy Gomez

This is a very good upgrade on the standard listview. Nice work!
(If this comment was disrespectful, please report it.)

 
3/2/2007 4:13:07 PM[rm_code]

Little bug, when item autosizing is on and you change both checkboxes and images to false not all items are displayed. Will be fixed with the next update.
(If this comment was disrespectful, please report it.)

 
3/2/2007 4:27:46 PMFomin Alexander

Excellent flexible thing!
(If this comment was disrespectful, please report it.)

 
3/2/2007 6:43:42 PMPaul Bahlawan

Oooo, that looks nice!
(If this comment was disrespectful, please report it.)

 
3/2/2007 11:23:38 PMenmity

oooooooo, after Carles PV, John(Steppenwolfe), you are making another listview;)
(If this comment was disrespectful, please report it.)

 
3/2/2007 11:24:46 PMenmity

i know you are making this for your great mp3 player, good to start, although the speed could be improved;)
(If this comment was disrespectful, please report it.)

 
3/2/2007 11:31:42 PMenmity

item(label) edit, sub item icon, header/border style(thin/flat) etc?
(If this comment was disrespectful, please report it.)

 
3/3/2007 5:08:22 AMLight Templer

Runs very smooth - impressive work! Fantastic (first?) use of Keith' alpha class. The only little thing I noticed is the problem with fast clicks to checkboxes. You have to raise a single click from the double click event internaly to get the hook immediatly. --- I did a speed test: 100.000 entries in simple are no problem. 1.000.000 takes 3 seconds to load, showing is always instant. But unloading the MAIN form needs about 30 seconds ... --- My ***** for this great control and regards - LiTe
(If this comment was disrespectful, please report it.)

 
3/3/2007 5:15:57 AMJoaquin Marcher

nice work men! 5 globes for you
(If this comment was disrespectful, please report it.)

 
3/3/2007 7:21:35 AMmahesh Kurmi

Salute to ur work
great!
(If this comment was disrespectful, please report it.)

 
3/3/2007 9:26:31 AMBruno C.

Pretty cool, you got my 5*
(If this comment was disrespectful, please report it.)

 
3/3/2007 7:08:57 PMRiccardo Cohen

Would be very nice if we could change col's styles, and add subscripts in items (like microsoft software uninstall). You got my 5 globes. Great work (also worls good on vista home premium)!!!
(If this comment was disrespectful, please report it.)

 
3/3/2007 9:09:46 PMMario Villanueva

Excellent work! thank's for sharing it! 5*
(If this comment was disrespectful, please report it.)

 
3/4/2007 5:12:15 AM[rm_code]

>> Dave, sorry, I recieved no msg. Maybe I overlooked it when fighting against those huge waves of spam. Need a new acc...

>> Cobein, could you please elaborate this more? I couldn't reproduce it.

>> Enmity, which part do you think needs performance improvements? Item management and/or drawing?
(If this comment was disrespectful, please report it.)

 
3/4/2007 5:42:06 AM[rm_code]

>> LiTe, which users do heavy clicking on a checkbox? :D But I will have a look at it.

>> Riccardo, colors for columns are a good idea. But "subscripts" would be way to complex.
(If this comment was disrespectful, please report it.)

 
3/4/2007 5:31:36 PMCobein

[rm_code] Open the big icons example and scroll down the list using the mousewheel, the first item will be screlled out of the list, even when the scrollbar is disabled.
(If this comment was disrespectful, please report it.)

 
3/5/2007 3:00:57 AMenmity

@[rm_code], adding 1,000,000 is fast, but unloading takes over 30 secs
(If this comment was disrespectful, please report it.)

 
3/6/2007 7:29:34 PMDave

rm, i sent you another message from pscode. Let me know if you get it.
(If this comment was disrespectful, please report it.)

 
3/10/2007 9:51:01 AMHeriberto Mantilla Santamaria

Gr8 control rm_code, take my 5*
(If this comment was disrespectful, please report it.)

 
3/11/2007 7:51:59 AMAgam Saran

Wow! Cool ListView! Thanks for sharing with us, 5 List-Items from me.
(If this comment was disrespectful, please report it.)

 
3/21/2007 10:17:32 PMPriyan R

Hey man, you are really doing great in such an age, I don't know may be i am becoming a fan of u! Best Wishes..
(If this comment was disrespectful, please report it.)

 
3/24/2007 6:34:06 PMFlavio Gonzalez Vazquez

Excelent as always!
(If this comment was disrespectful, please report it.)

 
3/28/2007 7:19:10 AMBody_of_Rays

5 things to become the best listview that ever exists:

* Column Drag n'Drop
* On AddColumn, one more parameter, to set that the items of that column is number ou string, to make different sort ways.
* Skin Column Headers
* Flat ScrollBars
* An Arrow, in the right of the column, when you click in one column to reorder it. Asc is arrow to down and Desc is arrow to up.

Nice JOB! We're waiting for updates! 5 globes
(If this comment was disrespectful, please report it.)

 
4/9/2007 10:34:43 AMaolingo

Fantastic!!
very beautiful and easy to use.
Give you my 5 gloves!!

And I want you to support unicode
and customized scrollbar !! it will be excellent
(If this comment was disrespectful, please report it.)

 
5/6/2007 6:52:37 PMJohn Owen

Hey RM,
5 Stars!!! Will you be adding a Report View, small icon view etc like the MS ListView - multi-row instead of a single row.

J
(If this comment was disrespectful, please report it.)

 
8/15/2007 3:30:39 AMrizan

great job man. carry on
(If this comment was disrespectful, please report it.)

 
9/13/2007 1:47:23 AMluxornet

Great code. But when I used listview.ocx I a new project, instruction: Set ListView1.DrawCallback = Me
gave me a runtime error.
What can I do?
(If this comment was disrespectful, please report it.)

 
11/13/2007 10:19:32 PMcomenk_indonesia

hi..
it's a nice job's
(If this comment was disrespectful, please report it.)

 
11/27/2007 12:32:24 AMKris Bennett (i00 Productions)

great control ... just wondering how you change an items icon index after you have already added the item?
cheers kris
(If this comment was disrespectful, please report it.)

 
3/23/2008 11:22:31 AMTim

Very good control. I made the following change to your AddPictureFromRes in order to use LaVolpe's AddPictureFromRes method. You need to pass the vb.global to his method so I've added a parameter "Optional VbGlobal As IUnknown" to your method to get this funtion working.

Public Function AddPictureFromRes(ByVal ResIndex As Variant, ByVal resSection As Variant, Optional VbGlobal As IUnknown) As Boolean
ReDim Preserve m_clsPictures(m_lngPictureCount) As c32bppDIB
Set m_clsPictures(m_lngPictureCount) = New c32bppDIB

With m_clsPictures(m_lngPictureCount)
.Alpha = True
.HighQualityInterpolation = False ' true would be extremly slow, but also very beautiful
AddPictureFromRes = .LoadPicture_Resource(ResIndex, resSection, VbGlobal, m_lngPictureWidth, m_lngPictureHeight)
End With

m_lngPictureCount = m_lngPictureCount + 1
End Function


Very nice work!

Tim
(If this comment was disrespectful, please report it.)

 
10/31/2008 3:31:18 AMvietteiv

3 Stars from me!!! Will you be adding a Report View, small icon view etc like the MS ListView
(If this comment was disrespectful, please report it.)

 
4/15/2009 8:12:35 PMNiO_ShOoTer

Can be added icons to sub items at any column?
(If this comment was disrespectful, please report it.)

 
12/23/2009 10:00:43 AMAhmad

its a great job, but why its so slow in my project when I add items to it
it takes about 1 or 2 seconds to load 15 items!
(If this comment was disrespectful, please report it.)

 
12/23/2009 10:29:37 AMAhmad

oh I found my answer, I should have used redraw flag
(If this comment was disrespectful, please report it.)

 
8/25/2010 8:02:38 AMRob C

Can this be used in a Project to avoid dependencies ?
That is, can the CTL file be added to another Project, as a 'User Control' ?

No VBG
No Dependencies
(If this comment was disrespectful, please report it.)

 
12/12/2010 3:16:46 AMRob C

Can anyone else answers my questions regarding using it as a user control in a VBP project ?
No VBG
No Dependencies
(If this comment was disrespectful, please report it.)

 
4/16/2012 12:45:14 PMClaudio 7007

Excelent, very good!!!
(If this comment was disrespectful, please report it.)

 
11/15/2012 2:04:34 PMdingy

The code is GREAT! Would it be possible to make it Unicode-aware?
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.