Graphics in a list box 
Author Message
 Graphics in a list box

Does anyone know where I could get information on including a graphic next
to an item in a list box?


Sun, 06 Feb 2005 08:48:40 GMT  
 Graphics in a list box
On Tue, 20 Aug 2002 19:48:40 -0500, "josh77"

Quote:

>Does anyone know where I could get information on including a graphic next
>to an item in a list box?

That's known as an "ownerdrawn" listbox in WinApi terminology. Instead
of rendering the contents themselves, ownerdrawn controls send their
owner WM_DRAWITEM messages when the contents need to be drawn. (A VB
ListBox with the Checkbox Style is an actually an ownerdraw listbox,
even though VB handles all the drawing internally). Writing an
ownerdraw control can be daunting, but it helps to have a reasonable
understanding of GDI Api graphics methods and subclassing.

There's a nice one that uses an imagelist (including source code) at:
        http://vbaccelerator.com/
There are also numerous other examples available. A Google search for
"ownerdraw listbox" should turn up a few.

-Tom
(please post replies to the newsgroup)



Sun, 06 Feb 2005 11:01:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. List Boxes with graphics

2. How to list macro names in a combo box or a list box

3. Help wanted with file list boxes and list boxes

4. VB List Box Versus Access List Box

5. Q: List Box to List Box Code

6. List box within List box

7. List box within List box

8. List box within List box

9. dialog box with list box or combo box

10. Limiting Access to Text Boxes, List Boxes and Combo Boxes

11. Listing all tables or queries in a list/combo box

12. How to list macro names in a combo box or a list

 

 
Powered by phpBB® Forum Software