Re: Listview and Treeview

new topic     » goto parent     » topic index » view thread      » older message » newer message

David Cuny wrote:

> It might make sense to treat the listview and treeview as a collection of
> controls, rather than as just data in a list. It might make it a lot
easier
> to change the text or graphic on an item, for example. I'll have to spend
a
> lot more time with the code - you've done a ton of work!

I've thought a bit about that, but did't want to implement anything on my
own, since there will be many things to change.  And it's not clear to me
what the best way will be.  Especially with the listview, since it's more of
a glorified listbox, and might make more sense to treat it as a collection
of data that might be erased and modified a lot.  We'll see.  I think that
the best indicator of where to go is to see how people use them, and follow
any suggestions that arise.

Of course, let me know if you have any questions about the code.  I tried to
keep it pretty clean, but there aren't many (any?) comments.  Once I 'broke
the code' on the listview, the treeview was pretty easy.  It probably took
me as long to get all the constants in as anything else (for the treeview).
And actually, Wolfgang asked me about the time it takes using equations to
define the constants.  I told him I was just too lazy to convert them (since
that's how they were in my cmctrl32.h file).  So maybe that's something else
to do to speed up load time a little.

BTW, I never really understood how your structures worked in win32lib, but
now that I've had to use them, they're pretty handy.

> If would also be nice if the imagelist could be hidden entirely from the
> user.

Absolutely.  I just wasn't sure how to do it without rewriting tons of stuff
(as you note below:) and possibly breaking code.

> The whole point of an imagelist is that the item will eventually be
> attached to something. So it might be possible to hide the details with
> something like this:

<SNIP>

> The routine could eventually be extended to work
> with other controls, like menus, buttons and windows. It would be the job
of
> the routine to take care of all the gory details:

<SNIP>

> It might even make sense to eventually deprecate setIcon and
> setBitmap and
> replace them with setImageToIcon and setImageToBitmap.

Let me know if you'd like some help with anything.  I think my next project
will be figuring out MDI apps.

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu