From: Tony Toews [MVP] on
I'd like to have a listbox with icons to the left and several lines of
text to the right. Largish icons 16x16 or 32x32. I want to dress
up a list box of configuration (INI) files with the icon images
referenced from within those INI files. Kinda useless but it adds
more graphic appeal to the program.

However, as is usual with all my requests, I don't want to use any
external DLLs or OCXs that users would have to install. My app is
currently a drag and drop deployment and I very much want to keep it
that way.

I've come across vbAccelerator ODCboLst Control
http://www.vbaccelerator.com/home/VB/Code/Controls/Combo_and_List_Boxes/Owner_Draw_Combo_and_List_Box/article.asp
which I will investigate in more detail shortly. It appears to do
what I want but requires a SSubTmr.DLL which I have to investigate a
bit.

Any suggestions?

Thanks, Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
From: DanS on
"Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote in
news:dut0q5lf212bjg2ap53s3v3d357oadm875(a)4ax.com:

> I'd like to have a listbox with icons to the left and
> several lines of text to the right. Largish icons 16x16
> or 32x32. I want to dress up a list box of configuration
> (INI) files with the icon images referenced from within
> those INI files. Kinda useless but it adds more graphic
> appeal to the program.
>
> However, as is usual with all my requests, I don't want to
> use any external DLLs or OCXs that users would have to
> install. My app is currently a drag and drop deployment
> and I very much want to keep it that way.
>
> I've come across vbAccelerator ODCboLst Control
> http://www.vbaccelerator.com/home/VB/Code/Controls/Combo_and
> _List_Boxes/Owner_Draw_Combo_and_List_Box/article.asp which
> I will investigate in more detail shortly. It appears to
> do what I want but requires a SSubTmr.DLL which I have to
> investigate a bit.
>
> Any suggestions?
>
> Thanks, Tony

SSubTmr is available as a class/module as well as a dll.....

http://www.vbaccelerator.com/codelib/ssubtmr/ssubtmr.htm
From: mayayana on
If you subclass the box and do your own
painting you can paint an image on the left
and just move the text painting area over.
I do that with solid color. I wanted to have
a color-coded bar at the left of each entry.
I've never tried an icon, but I don't see why
you can't do that. My version is a self-subclassing
listbox on a userControl that uses Paul Caton's
subclassing code to get the DRAWITEM message.
It's not very complex. I'd be happy to send you
a copy if you don't find something better.

> I'd like to have a listbox with icons to the left and several lines of
> text to the right. Largish icons 16x16 or 32x32. I want to dress
> up a list box of configuration (INI) files with the icon images
> referenced from within those INI files. Kinda useless but it adds
> more graphic appeal to the program.
>
> However, as is usual with all my requests, I don't want to use any
> external DLLs or OCXs that users would have to install. My app is
> currently a drag and drop deployment and I very much want to keep it
> that way.
>
> I've come across vbAccelerator ODCboLst Control
>
http://www.vbaccelerator.com/home/VB/Code/Controls/Combo_and_List_Boxes/Owne
r_Draw_Combo_and_List_Box/article.asp
> which I will investigate in more detail shortly. It appears to do
> what I want but requires a SSubTmr.DLL which I have to investigate a
> bit.
>
> Any suggestions?
>
> Thanks, Tony
> --
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files
> updated see http://www.autofeupdater.com/
> Granite Fleet Manager http://www.granitefleet.com/


From: Shotgun Thom on
On Mar 16, 11:55 pm, "Tony Toews [MVP]" <tto...(a)telusplanet.net>
wrote:
> I'd like to have a listbox with icons to the left and several lines of
> text to the right.   Largish icons 16x16 or 32x32.   I want to dress
> up a list box of configuration (INI) files with the icon images
> referenced from within those INI files.    Kinda useless but it adds
> more graphic appeal to the program.
>
> However, as is usual with all my requests, I don't want to use any
> external DLLs or OCXs that users would have to install.  My app is
> currently a drag and drop deployment and I very much want to keep it
> that way.
>
> I've come across vbAccelerator ODCboLst Controlhttp://www.vbaccelerator.com/home/VB/Code/Controls/Combo_and_List_Box...
> which I will investigate in more detail shortly.   It appears to do
> what I want but requires a SSubTmr.DLL which I have to investigate a
> bit.
>
> Any suggestions?
>
> Thanks, Tony
> --
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages -http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files
>   updated seehttp://www.autofeupdater.com/
> Granite Fleet Managerhttp://www.granitefleet.com/

Take a look at this List Box control:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=69001&lngWId=1

You can embed the control in your project so there would be no
dependencies to ship.

Also includes it's own Image List control so you wouldn't need to add
the VB6 control.

The demo included is very good and shows the many possibilities.
Works well.

Tom
From: Karl E. Peterson on
Tony Toews [MVP] wrote:
> I'd like to have a listbox with icons to the left and several lines of
> text to the right. Largish icons 16x16 or 32x32. I want to dress
> up a list box of configuration (INI) files with the icon images
> referenced from within those INI files. Kinda useless but it adds
> more graphic appeal to the program.

Owner-drawn listbox. Lots of examples out there.

> I've come across vbAccelerator ODCboLst Control
<snip>
> requires a SSubTmr.DLL which I have to investigate a bit.
>
> Any suggestions?

Yeah, ignore the dependencies introduced at vbAccelerator, and
concentrate on the methods being used. This one is, I believe, just
his version of subclassing, of which everyone prefers different styles.

The important thing to do with any of these samples is to go straight
to the message processing routine, and see what it's doing. Then wire
up the hook however you're most comfortable.

--
..NET: It's About Trust!
http://vfred.mvps.org