Results 1 to 7 of 7

Thread: What does ListView really do?

  1. #1

    Thread Starter
    Join Date
    Mar 2015

    What does ListView really do?

    When use Listview instead of multi-column listbox?

    Other than having the ability to add a stationery headers for each column, I don't see how this is better than listbox. What do people use that for?

    I believe in VB6, there is MSFgrid or/and datagrid controls, which are a lot easier to handle. I having written anything to seriously with VB6 for a while.
    Last edited by ssal; Mar 5th, 2015 at 06:09 PM.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Beside Waldo

    Re: What does ListView really do?

    Here are a few examples, but your question is too wide-opened. I guess the real answer is, it depends on what you need and what other controls can offer. Each individual control usually has pros/cons when compared to controls of similar function. The items below are listed with the assumption that owner-drawn controls are off the table. If owner-drawing, than anything can literally be done.

    - Windows Explorer file list. Multicolumn listbox can't really support that functionality without a lot of owner-drawing.
    - Multiple item formatting, i.e., colors, font, etc
    - Image support
    - Tag options per item
    - Multiple column sorting
    - Column re-ordering
    - Variable row height, variable column width
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online

    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3
    Frenzied Member
    Join Date
    May 2006
    some place in the cloud

    Re: What does ListView really do?

    ...and more features...
    -4 types of view
    -and more
    Just see the ListView's Properties Page

    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  4. #4
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    NC, USA

    Re: What does ListView really do?

    Now, my comments may not help at all, but I rarely use MY opinion, I can do MOST of those things using the MSFlexGrid/MSHFlexGrid controls 'easier'. I guess it is what you get used to, and what your needs are.

  5. #5
    Join Date
    Feb 2006

    Re: What does ListView really do?

    I'm not sure why ListViews have come into vogue in recent times. If all you use is the Report view you have probably chosen the wrong control.

    Perhaps the problem is appearance? The moldly MSFlexGrid and its replacement MSHFlexGrid are both tied to hard-coded Win9x drawing styles so they can look a little "cave man" today. The COMCTL32.OCX ListView is a wrapper on the system Common Control so you can get a better appearance simply by selecting the Common Controls 6 assembly.

  6. #6
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Manchester uk

    Re: What does ListView really do?

    The COMCTL32.OCX ListView is a wrapper on the system Common Control so you can get a better appearance simply by selecting the Common Controls 6 assembly.
    I think you hit the nail on the head there, the ListView control just looks better than the Flexgrid and is way more functional than the Listbox.
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you

  7. #7
    Frenzied Member Gruff's Avatar
    Join Date
    Jan 2014
    Scappoose Oregon USA

    Re: What does ListView really do?

    For dealing with tabular data I always preferred the MSHFlexgrid control.

    If I needed flexible views of data on the fly then I used the ListView.

    The drop down view mode options in Windows Explorer (Top right) is an example of how the listview can be leveraged.

    BTW ssal, The Column property in the standard listbox control does not display data as true columns.
    Instead it wraps the visual data from the bottom of one column to the top of the next.
    There is no vertical scroll in this mode only horizontal scroll.

    Again in Windows Explorer if you select the 'List' view mode you will see this behavior.
    Burn the land and boil the sea
    You can't take the sky from me


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