Click to See Complete Forum and Search --> : Gotta Love that ListView - MultiLine and Checkbox questions


Mark D. Scudder
April 30th, 2001, 04:46 PM
Gotta wonder how with all these kludges there's any TreeView/ListView software written, *ever*.

First (and big) question: How do I implement some of the functionality of, say, a Microsoft-Outlook-style ListView in my programs? The indenting, the block of text (you know, the blue one) underneath the actual list item, etc? Should I be using a third-party control? And if so, is there one that's free? I'm not cheap, I just figure that Microsoft didn't pay some guy at a software house $900 for an "Outlook-like" ListView OCX when they were writing Outlook :-). Besides the fact that at times like these, I'm sitting here wondering why I spent money *at all* on VB when all the cool stuff is in the aftermarket controls.

Second Question: Why are there thousands of tutorials on VB sites regarding how to put checkboxes in a ListView, when all I had to do was click "Checkboxes" in the control's Custom dialog? And for that matter, why is there a similar number of webpages explaining how one selects a full row in a ListView, when all I've ever had to do was check "FullRowSelect" in the same place?

(I'm asking in part because I'm designing my first app with checkboxes in the ListView, and I'm wondering if those 1,000 lines of code and all the API calls and the somebody-else's-code-I'm-really-never-going-to-understand is easier than the built-in method.)

Thanks,
Mark

-----
Mark D. Scudder
(www.markscudder.com)

Johnny101
April 30th, 2001, 04:56 PM
The reason for all the other websites explaining how to put FullRowSelect-ability and Checkboxes is because, before VB6, those weren't options on the listview. It was done with API calls - some of them fairly messy at that. M$ finally figured out that we were tweaking their controls so much, that it was just easier to wrap all that stuff into a single control. When VB6 came out, they warapped all the popular API into it as well. FullRowSelect, Gridlines, checkboxes, HoverSelect and some other junk. If that had always been there, don't you think someone would have found it by now? This is the case for most of the stuff on code sites. If there is a property for it now, it's because there hasn't been for years prior. Take the ImageCombo control, for example. That's new VB6 - and if you look hard enough, you'll find some code that some poor guy slaved over for about a week to put together. now M$ just up and releases the same control - but only after they realised it would help out programmers.

the things that M$ does in their apps aren't generally available to us for at least of couple of years. Take the flat toolbar control. IE 4 had it, Office 97 had it and VB 5 had it. But we couldn't use it until VB6. As for outlook - they probably are using some sort of custom Hiearchical Flex Grid to group those messages like that. I bet with enough cursing and beatin on the keyboard, someone here could mimic it.

john

John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org

Brian Wahoff
May 14th, 2001, 10:30 AM
If you haven't already, check out http://www.vbaccelerator.com. There are several good FREE controls there, and one of which is an outlook style grid