ListView TextColour 
Author Message
 ListView TextColour

I'd like to have the items in a listview (report style) to
have a different text colour.  Important items to appear in
red for example.  I know I could use an icon for this purpose
but the user doesn't want an icon :/

Drac



Sat, 21 Apr 2001 03:00:00 GMT  
 ListView TextColour

You will either :

1. Get VB6 - I've heard talk that the Listview in this version will do just
what you want - I've never tried though.

2. Get a third party OCX. Mabry's ListX control does this (Doesn't look like
a ListView though)

3. Ask me nicely, and I'll repost my Subclassing example which show's how to
accomplish this with the WinAPI.

Regards

Chris Eastwood
Software Engineer
ACNielsen Ltd

Quote:

>I'd like to have the items in a listview (report style) to
>have a different text colour.  Important items to appear in
>red for example.  I know I could use an icon for this purpose
>but the user doesn't want an icon :/

>Drac



Sun, 22 Apr 2001 03:00:00 GMT  
 ListView TextColour
Chris,
I read with great interest your reply to the posting about listitem colours.

I am currently working on a project in VB5, and the only solution available
to me is one using the WinAPI. There are strict controls governing the use
of 3rd Party components, so using the Mabry control is all but out of the
question, and until VB6 has been fully evaluated by our R&D department, we
cannot move to VB6.

I have been trying to fiond a way to set the color of individual listitems
for many months, and have as yet been unable to find out how.  I have
various routines that use the API to set checkboxes, hot tracking, full row
select etc., but not listitem colour.

As you suggested in point 3 of your reply, asking you nicely might prompt
you to repost your subclassing example on how to do it.......so here it
goes.....

PPPPPPPPPLLLLLLLLLLEEEEEEEEEAAAAAAAASSSSSSSSSEEEEEEE Please Please Please
Please Please Please Please can you repost your example, or email me direct.

Any assistance you can offer in this matter is greatly appreciated.

Regards,

Cameron Gibbs
Austcomm Tele Services

Quote:

>You will either :

>1. Get VB6 - I've heard talk that the Listview in this version will do just
>what you want - I've never tried though.

>2. Get a third party OCX. Mabry's ListX control does this (Doesn't look
like
>a ListView though)

>3. Ask me nicely, and I'll repost my Subclassing example which show's how
to
>accomplish this with the WinAPI.

>Regards

>Chris Eastwood
>Software Engineer
>ACNielsen Ltd


>>I'd like to have the items in a listview (report style) to
>>have a different text colour.  Important items to appear in
>>red for example.  I know I could use an icon for this purpose
>>but the user doesn't want an icon :/

>>Drac



Tue, 24 Apr 2001 03:00:00 GMT  
 ListView TextColour
Ok everyone.

Due to the amount of private Emails I'm getting on this subject, I've setup
my email to automatically send the code to anybody mailing me with the
subject of 'cdlistview' (at least, I think I've set it up correctly).

So if anyone wants the code, you know what to do.

Regards

Chris Eastwood
Software Engineer
ACNielsen Ltd

Quote:

>Chris,
>I read with great interest your reply to the posting about listitem
colours.

>I am currently working on a project in VB5, and the only solution available
>to me is one using the WinAPI. There are strict controls governing the use
>of 3rd Party components, so using the Mabry control is all but out of the
>question, and until VB6 has been fully evaluated by our R&D department, we
>cannot move to VB6.

>I have been trying to fiond a way to set the color of individual listitems
>for many months, and have as yet been unable to find out how.  I have
>various routines that use the API to set checkboxes, hot tracking, full row
>select etc., but not listitem colour.

>As you suggested in point 3 of your reply, asking you nicely might prompt
>you to repost your subclassing example on how to do it.......so here it
>goes.....

>PPPPPPPPPLLLLLLLLLLEEEEEEEEEAAAAAAAASSSSSSSSSEEEEEEE Please Please Please
>Please Please Please Please can you repost your example, or email me
direct.

>Any assistance you can offer in this matter is greatly appreciated.

>Regards,

>Cameron Gibbs
>Austcomm Tele Services



Tue, 24 Apr 2001 03:00:00 GMT  
 ListView TextColour
On Fri, 6 Nov 1998 08:56:02 -0000, "Chris Eastwood"

Quote:

>Ok everyone.

>Due to the amount of private Emails I'm getting on this subject, I've setup
>my email to automatically send the code to anybody mailing me with the
>subject of 'cdlistview' (at least, I think I've set it up correctly).

>So if anyone wants the code, you know what to do.

<Snip>

Yikes! Got your code (no subclass.ocx so I can't run it).
Looking at the code I do have it looks a little more complicated
than I'd hoped.

Drac



Sat, 28 Apr 2001 03:00:00 GMT  
 ListView TextColour


Quote:
>Yikes! Got your code (no subclass.ocx so I can't run it).
>Looking at the code I do have it looks a little more complicated
>than I'd hoped.

>Drac

Sorry about that, I hadn't set up my email to reply with the full message.
You need a subclassing control (or rewrite the code with AddressOf) - I use
the free one (with source) from http://www.softcircuits.com.

 Yes, you're correct. The code is pretty mind bending unless you know about
the WinAPI, Subclassing and Custom Draw Notifications. A good place to get
started on learning this stuff is the msdn (http://msdn.microsoft.com).

 Using the CustomDraw notification routines, you can replace the painting
for other controls which support the messages (TreeView is another that
springs to mind - I've got code to repaint different coloured Nodes under
VB5 also).

Good Luck

Chris Eastwood
Software Engineer
ACNielsen Ltd



Sat, 28 Apr 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Drag an item of Listview to another position of the same ListView

2. Ownerdraw works with ListView 5.0 but not with ListView 6.0

3. Dragging from ListView to ListView or TreeView

4. Listview vs. Extended Listview

5. Listview: synchronize two listviews

6. Ownerdraw works with ListView 5.0 but not with ListView 6.0 (in this sample)

7. Listview: check if an item in current listview

8. ListView to ListView copying ???

9. ListView column width = ListView width ?

10. changing the background of a listview item in the listview control

11. Listview Control - moving items from one listview to another

12. Listview: Determining ListView from ListItem????

 

 
Powered by phpBB® Forum Software