Mayayana,
Post by MayayanaA listview needs to load icons to be useful,
I'm often using it in "report" mode, in which I only display text. (alike
the "details" mode in the "file explorer"). Icons can be used there, but
do not need to be.
Post by MayayanaPersonally I've never even used a listview in any
software. It's just too much of a complex hassle.
Granted, It's not the easiest control to work with. Especially as it has
different modi you can use.
Post by MayayanaI'm guessing you're making this control as an
experiment rather than with some specific purpose.
Well, Its actually for the other side of the equation, the scripting-engine.
I've implemented loading a non-installed control, and now would like to see
if I can create the equivalent of "wscript.ConnectObject()" for it (so I can
accept callbacks to the scripting-engine).
For testing purposes I need a control which generates events. The ListView
was just the last control of a few which all seemed to work, but stayed
invisible. I just assumed I missed/forgot to do something. Only later I
noticed the absense of, among others, positional and size
properties/functions, which made me wonder if they where ment to be directly
accessed at all ...
But yes, there is a chance I will, at some time or another, try to wrap some
implementation of the listview into an OCX.
Though currently I'm still struggeling with the basics, like how to describe
certain things in the typelib -- can't seem to get an "[out] long*
Something" accepted by the VBS scripting engine (type-mismatch. most likely
expects/wants a variant). Which is odd to me, as an "[out, retval] *long
Result" works without a problem.
Regards,
Rudy Wieser
Post by MayayanaThere are at least two problems: First, the control
is licensed. You need a VB/VS license to use it.
Second, as demonstrated by Reventlov's sample,
while it's possible to use it in an HTA or other window
if you have the license, it's still of no real use. What
Reventlov did was clever, but it's no better than
multiple HTML SELECT elements, which are essentially
listboxes. A listview needs to load icons to be useful,
and is typically only used to display the file system.
I've made wrapper DLLs for some controls, like listbox
and RichEdit window, which allows them to be used in
VBS. What mainly makes them useful is that the properties
and methods are wrapped for easy access by VBS.
Personally I've never even used a listview in any
software. It's just too much of a complex hassle. I'm
guessing you're making this control as an experiment
rather than with some specific purpose. You could
probably create a passably useful listview in HTML
as a table with IMG elements in TDs if you really
need that. And it would probably be easier than trying
to tame the VB6 listview control. (I imagine HTML listviews
are probably already being done by some "HTML5"
hotshots.)