473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Listview Highlight

Hi there,

Just wondering if I change the back and fore colour of a listview item when
the mouse hovers over it? I want to overide the default windows colour.

Can someone please tell me how to do this?

Thanks
Devron
Nov 20 '05 #1
9 3019

Hi Devron,

I think you should do some hit-test yourself to determine the mouse is over
which item.
You can handle your hit-test code in MouseHover event, if you want to
change its color not imediatly.
If you want the item's color change imediatly, you can refer to the
MouseEnter and MouseLeave event.

If you still have any unclear, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Devron Blatchford" <de****@auspine.com.au>
| Subject: Listview Highlight
| Date: Thu, 9 Oct 2003 10:09:42 +0930
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145204
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Hi there,
|
| Just wondering if I change the back and fore colour of a listview item
when
| the mouse hovers over it? I want to overide the default windows colour.
|
| Can someone please tell me how to do this?
|
| Thanks
| Devron
|
|
|

Nov 20 '05 #2

Hi Devron,

Hit-test means that you calculate the mouse point is over which item by the
mouse's x, y coordinate and the height, width of every item.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Newsgroups: microsoft.public.dotnet.languages.vb
| From: v-*****@online.microsoft.com (Jeffrey Tan[MSFT])
| Organization: Microsoft
| Date: Thu, 09 Oct 2003 02:42:05 GMT
| Subject: RE: Listview Highlight
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
|
|
| Hi Devron,
|
| I think you should do some hit-test yourself to determine the mouse is
over
| which item.
| You can handle your hit-test code in MouseHover event, if you want to
| change its color not imediatly.
| If you want the item's color change imediatly, you can refer to the
| MouseEnter and MouseLeave event.
|
| If you still have any unclear, please feel free to let me know.
|
| Best regards,
| Jeffrey Tan
| Microsoft Online Partner Support
| Get Secure! - www.microsoft.com/security
| This posting is provided "as is" with no warranties and confers no rights.
|
| --------------------
| | From: "Devron Blatchford" <de****@auspine.com.au>
| | Subject: Listview Highlight
| | Date: Thu, 9 Oct 2003 10:09:42 +0930
| | Lines: 11
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| | Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.languages.vb
| | NNTP-Posting-Host: 203.108.249.179
| | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145204
| | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| |
| | Hi there,
| |
| | Just wondering if I change the back and fore colour of a listview item
| when
| | the mouse hovers over it? I want to overide the default windows colour.
| |
| | Can someone please tell me how to do this?
| |
| | Thanks
| | Devron
| |
| |
| |
|

Nov 20 '05 #3
Ok, that great and I can do that.

Just one question. How do I stop the item being highlighted with the default
blue once it is selected or change the default windows blue to another
color?

Thanks
Devron
"Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
news:jM*************@cpmsftngxa06.phx.gbl...

Hi Devron,

Hit-test means that you calculate the mouse point is over which item by the mouse's x, y coordinate and the height, width of every item.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Newsgroups: microsoft.public.dotnet.languages.vb
| From: v-*****@online.microsoft.com (Jeffrey Tan[MSFT])
| Organization: Microsoft
| Date: Thu, 09 Oct 2003 02:42:05 GMT
| Subject: RE: Listview Highlight
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
|
|
| Hi Devron,
|
| I think you should do some hit-test yourself to determine the mouse is
over
| which item.
| You can handle your hit-test code in MouseHover event, if you want to
| change its color not imediatly.
| If you want the item's color change imediatly, you can refer to the
| MouseEnter and MouseLeave event.
|
| If you still have any unclear, please feel free to let me know.
|
| Best regards,
| Jeffrey Tan
| Microsoft Online Partner Support
| Get Secure! - www.microsoft.com/security
| This posting is provided "as is" with no warranties and confers no rights. |
| --------------------
| | From: "Devron Blatchford" <de****@auspine.com.au>
| | Subject: Listview Highlight
| | Date: Thu, 9 Oct 2003 10:09:42 +0930
| | Lines: 11
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| | Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.languages.vb
| | NNTP-Posting-Host: 203.108.249.179
| | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145204
| | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| |
| | Hi there,
| |
| | Just wondering if I change the back and fore colour of a listview item
| when
| | the mouse hovers over it? I want to overide the default windows colour. | |
| | Can someone please tell me how to do this?
| |
| | Thanks
| | Devron
| |
| |
| |
|

Nov 20 '05 #4

Hi Devron,

It seems that when you select the item, its backcolor and forecolor will
both been cleared and display the color of the system color(I mean the
default selected mode item color ), so it needs not extra handle.

For your second "change the default windows blue to another", I do not
quite understand, can you explain to me more clear?

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Devron Blatchford" <de****@auspine.com.au>
| References: <#E**************@TK2MSFTNGP12.phx.gbl>
<SQ**************@cpmsftngxa06.phx.gbl>
<jM*************@cpmsftngxa06.phx.gbl>
| Subject: Re: Listview Highlight
| Date: Thu, 9 Oct 2003 12:56:38 +0930
| Lines: 91
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O9**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145221
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Ok, that great and I can do that.
|
| Just one question. How do I stop the item being highlighted with the
default
| blue once it is selected or change the default windows blue to another
| color?
|
| Thanks
| Devron
|
|
| "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
| news:jM*************@cpmsftngxa06.phx.gbl...
| >
| > Hi Devron,
| >
| > Hit-test means that you calculate the mouse point is over which item by
| the
| > mouse's x, y coordinate and the height, width of every item.
| >
| > Hope this helps,
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | From: v-*****@online.microsoft.com (Jeffrey Tan[MSFT])
| > | Organization: Microsoft
| > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | Subject: RE: Listview Highlight
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | MIME-Version: 1.0
| > | Content-Type: text/plain
| > | Content-Transfer-Encoding: 7bit
| > |
| > |
| > | Hi Devron,
| > |
| > | I think you should do some hit-test yourself to determine the mouse is
| > over
| > | which item.
| > | You can handle your hit-test code in MouseHover event, if you want to
| > | change its color not imediatly.
| > | If you want the item's color change imediatly, you can refer to the
| > | MouseEnter and MouseLeave event.
| > |
| > | If you still have any unclear, please feel free to let me know.
| > |
| > | Best regards,
| > | Jeffrey Tan
| > | Microsoft Online Partner Support
| > | Get Secure! - www.microsoft.com/security
| > | This posting is provided "as is" with no warranties and confers no
| rights.
| > |
| > | --------------------
| > | | From: "Devron Blatchford" <de****@auspine.com.au>
| > | | Subject: Listview Highlight
| > | | Date: Thu, 9 Oct 2003 10:09:42 +0930
| > | | Lines: 11
| > | | X-Priority: 3
| > | | X-MSMail-Priority: Normal
| > | | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | | Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>
| > | | Newsgroups: microsoft.public.dotnet.languages.vb
| > | | NNTP-Posting-Host: 203.108.249.179
| > | | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| > | | Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.vb:145204
| > | | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | |
| > | | Hi there,
| > | |
| > | | Just wondering if I change the back and fore colour of a listview
item
| > | when
| > | | the mouse hovers over it? I want to overide the default windows
| colour.
| > | |
| > | | Can someone please tell me how to do this?
| > | |
| > | | Thanks
| > | | Devron
| > | |
| > | |
| > | |
| > |
| >
|
|
|

Nov 20 '05 #5
Basically I want to sepcify the selected colours myself insted of using the
default windows colours. I can change the item colours but the selected
color is always the default system selected colour.

I want to ovewrite this.

Thanks
Devron

"Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
news:RM**************@cpmsftngxa06.phx.gbl...

Hi Devron,

It seems that when you select the item, its backcolor and forecolor will
both been cleared and display the color of the system color(I mean the
default selected mode item color ), so it needs not extra handle.

For your second "change the default windows blue to another", I do not
quite understand, can you explain to me more clear?

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Devron Blatchford" <de****@auspine.com.au>
| References: <#E**************@TK2MSFTNGP12.phx.gbl>
<SQ**************@cpmsftngxa06.phx.gbl>
<jM*************@cpmsftngxa06.phx.gbl>
| Subject: Re: Listview Highlight
| Date: Thu, 9 Oct 2003 12:56:38 +0930
| Lines: 91
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O9**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145221
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Ok, that great and I can do that.
|
| Just one question. How do I stop the item being highlighted with the
default
| blue once it is selected or change the default windows blue to another
| color?
|
| Thanks
| Devron
|
|
| "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
| news:jM*************@cpmsftngxa06.phx.gbl...
| >
| > Hi Devron,
| >
| > Hit-test means that you calculate the mouse point is over which item by | the
| > mouse's x, y coordinate and the height, width of every item.
| >
| > Hope this helps,
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | From: v-*****@online.microsoft.com (Jeffrey Tan[MSFT])
| > | Organization: Microsoft
| > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | Subject: RE: Listview Highlight
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | MIME-Version: 1.0
| > | Content-Type: text/plain
| > | Content-Transfer-Encoding: 7bit
| > |
| > |
| > | Hi Devron,
| > |
| > | I think you should do some hit-test yourself to determine the mouse is | > over
| > | which item.
| > | You can handle your hit-test code in MouseHover event, if you want to | > | change its color not imediatly.
| > | If you want the item's color change imediatly, you can refer to the
| > | MouseEnter and MouseLeave event.
| > |
| > | If you still have any unclear, please feel free to let me know.
| > |
| > | Best regards,
| > | Jeffrey Tan
| > | Microsoft Online Partner Support
| > | Get Secure! - www.microsoft.com/security
| > | This posting is provided "as is" with no warranties and confers no
| rights.
| > |
| > | --------------------
| > | | From: "Devron Blatchford" <de****@auspine.com.au>
| > | | Subject: Listview Highlight
| > | | Date: Thu, 9 Oct 2003 10:09:42 +0930
| > | | Lines: 11
| > | | X-Priority: 3
| > | | X-MSMail-Priority: Normal
| > | | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | | Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>
| > | | Newsgroups: microsoft.public.dotnet.languages.vb
| > | | NNTP-Posting-Host: 203.108.249.179
| > | | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl | > | | Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.vb:145204
| > | | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | |
| > | | Hi there,
| > | |
| > | | Just wondering if I change the back and fore colour of a listview
item
| > | when
| > | | the mouse hovers over it? I want to overide the default windows
| colour.
| > | |
| > | | Can someone please tell me how to do this?
| > | |
| > | | Thanks
| > | | Devron
| > | |
| > | |
| > | |
| > |
| >
|
|
|

Nov 20 '05 #6

Hi Devron,

I got it.
Because change the system color will effect all the control in the system,
I think you should do the owner-draw to the ListView Control yourself.
To do ListView owner-draw in .Net C#, you can refer to this document:
http://dotnetclient/Whidbey/Runtime%.../OwnerDraw.doc

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Devron Blatchford" <de****@auspine.com.au>
| References: <#E**************@TK2MSFTNGP12.phx.gbl>
<SQ**************@cpmsftngxa06.phx.gbl>
<jM*************@cpmsftngxa06.phx.gbl>
<O9**************@TK2MSFTNGP09.phx.gbl>
<RM**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Listview Highlight
| Date: Fri, 10 Oct 2003 13:14:36 +0930
| Lines: 151
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OS**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145570
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Basically I want to sepcify the selected colours myself insted of using
the
| default windows colours. I can change the item colours but the selected
| color is always the default system selected colour.
|
| I want to ovewrite this.
|
| Thanks
| Devron
|
|
|
| "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
| news:RM**************@cpmsftngxa06.phx.gbl...
| >
| > Hi Devron,
| >
| > It seems that when you select the item, its backcolor and forecolor will
| > both been cleared and display the color of the system color(I mean the
| > default selected mode item color ), so it needs not extra handle.
| >
| > For your second "change the default windows blue to another", I do not
| > quite understand, can you explain to me more clear?
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Devron Blatchford" <de****@auspine.com.au>
| > | References: <#E**************@TK2MSFTNGP12.phx.gbl>
| > <SQ**************@cpmsftngxa06.phx.gbl>
| > <jM*************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: Listview Highlight
| > | Date: Thu, 9 Oct 2003 12:56:38 +0930
| > | Lines: 91
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <O9**************@TK2MSFTNGP09.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | NNTP-Posting-Host: 203.108.249.179
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145221
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > |
| > | Ok, that great and I can do that.
| > |
| > | Just one question. How do I stop the item being highlighted with the
| > default
| > | blue once it is selected or change the default windows blue to another
| > | color?
| > |
| > | Thanks
| > | Devron
| > |
| > |
| > | "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
| > | news:jM*************@cpmsftngxa06.phx.gbl...
| > | >
| > | > Hi Devron,
| > | >
| > | > Hit-test means that you calculate the mouse point is over which item
| by
| > | the
| > | > mouse's x, y coordinate and the height, width of every item.
| > | >
| > | > Hope this helps,
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | > | From: v-*****@online.microsoft.com (Jeffrey Tan[MSFT])
| > | > | Organization: Microsoft
| > | > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | > | Subject: RE: Listview Highlight
| > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain
| > | > | Content-Transfer-Encoding: 7bit
| > | > |
| > | > |
| > | > | Hi Devron,
| > | > |
| > | > | I think you should do some hit-test yourself to determine the
mouse
| is
| > | > over
| > | > | which item.
| > | > | You can handle your hit-test code in MouseHover event, if you want
| to
| > | > | change its color not imediatly.
| > | > | If you want the item's color change imediatly, you can refer to
the
| > | > | MouseEnter and MouseLeave event.
| > | > |
| > | > | If you still have any unclear, please feel free to let me know.
| > | > |
| > | > | Best regards,
| > | > | Jeffrey Tan
| > | > | Microsoft Online Partner Support
| > | > | Get Secure! - www.microsoft.com/security
| > | > | This posting is provided "as is" with no warranties and confers no
| > | rights.
| > | > |
| > | > | --------------------
| > | > | | From: "Devron Blatchford" <de****@auspine.com.au>
| > | > | | Subject: Listview Highlight
| > | > | | Date: Thu, 9 Oct 2003 10:09:42 +0930
| > | > | | Lines: 11
| > | > | | X-Priority: 3
| > | > | | X-MSMail-Priority: Normal
| > | > | | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | | Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>
| > | > | | Newsgroups: microsoft.public.dotnet.languages.vb
| > | > | | NNTP-Posting-Host: 203.108.249.179
| > | > | | Path:
| cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| > | > | | Xref: cpmsftngxa06.phx.gbl
| > microsoft.public.dotnet.languages.vb:145204
| > | > | | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | > | |
| > | > | | Hi there,
| > | > | |
| > | > | | Just wondering if I change the back and fore colour of a
listview
| > item
| > | > | when
| > | > | | the mouse hovers over it? I want to overide the default windows
| > | colour.
| > | > | |
| > | > | | Can someone please tell me how to do this?
| > | > | |
| > | > | | Thanks
| > | > | | Devron
| > | > | |
| > | > | |
| > | > | |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #7
FM
that links is bogus

"Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
news:xB**************@cpmsftngxa06.phx.gbl...

Hi Devron,

I got it.
Because change the system color will effect all the control in the system,
I think you should do the owner-draw to the ListView Control yourself.
To do ListView owner-draw in .Net C#, you can refer to this document:
http://dotnetclient/Whidbey/Runtime%.../OwnerDraw.doc

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Devron Blatchford" <de****@auspine.com.au>
| References: <#E**************@TK2MSFTNGP12.phx.gbl>
<SQ**************@cpmsftngxa06.phx.gbl>
<jM*************@cpmsftngxa06.phx.gbl>
<O9**************@TK2MSFTNGP09.phx.gbl>
<RM**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Listview Highlight
| Date: Fri, 10 Oct 2003 13:14:36 +0930
| Lines: 151
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OS**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145570
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Basically I want to sepcify the selected colours myself insted of using
the
| default windows colours. I can change the item colours but the selected
| color is always the default system selected colour.
|
| I want to ovewrite this.
|
| Thanks
| Devron
|
|
|
| "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
| news:RM**************@cpmsftngxa06.phx.gbl...
| >
| > Hi Devron,
| >
| > It seems that when you select the item, its backcolor and forecolor will | > both been cleared and display the color of the system color(I mean the
| > default selected mode item color ), so it needs not extra handle.
| >
| > For your second "change the default windows blue to another", I do not
| > quite understand, can you explain to me more clear?
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Devron Blatchford" <de****@auspine.com.au>
| > | References: <#E**************@TK2MSFTNGP12.phx.gbl>
| > <SQ**************@cpmsftngxa06.phx.gbl>
| > <jM*************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: Listview Highlight
| > | Date: Thu, 9 Oct 2003 12:56:38 +0930
| > | Lines: 91
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <O9**************@TK2MSFTNGP09.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | NNTP-Posting-Host: 203.108.249.179
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145221 | > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > |
| > | Ok, that great and I can do that.
| > |
| > | Just one question. How do I stop the item being highlighted with the
| > default
| > | blue once it is selected or change the default windows blue to another | > | color?
| > |
| > | Thanks
| > | Devron
| > |
| > |
| > | "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
| > | news:jM*************@cpmsftngxa06.phx.gbl...
| > | >
| > | > Hi Devron,
| > | >
| > | > Hit-test means that you calculate the mouse point is over which item | by
| > | the
| > | > mouse's x, y coordinate and the height, width of every item.
| > | >
| > | > Hope this helps,
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | > | From: v-*****@online.microsoft.com (Jeffrey Tan[MSFT])
| > | > | Organization: Microsoft
| > | > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | > | Subject: RE: Listview Highlight
| > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain
| > | > | Content-Transfer-Encoding: 7bit
| > | > |
| > | > |
| > | > | Hi Devron,
| > | > |
| > | > | I think you should do some hit-test yourself to determine the
mouse
| is
| > | > over
| > | > | which item.
| > | > | You can handle your hit-test code in MouseHover event, if you want | to
| > | > | change its color not imediatly.
| > | > | If you want the item's color change imediatly, you can refer to
the
| > | > | MouseEnter and MouseLeave event.
| > | > |
| > | > | If you still have any unclear, please feel free to let me know.
| > | > |
| > | > | Best regards,
| > | > | Jeffrey Tan
| > | > | Microsoft Online Partner Support
| > | > | Get Secure! - www.microsoft.com/security
| > | > | This posting is provided "as is" with no warranties and confers no | > | rights.
| > | > |
| > | > | --------------------
| > | > | | From: "Devron Blatchford" <de****@auspine.com.au>
| > | > | | Subject: Listview Highlight
| > | > | | Date: Thu, 9 Oct 2003 10:09:42 +0930
| > | > | | Lines: 11
| > | > | | X-Priority: 3
| > | > | | X-MSMail-Priority: Normal
| > | > | | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | | Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>
| > | > | | Newsgroups: microsoft.public.dotnet.languages.vb
| > | > | | NNTP-Posting-Host: 203.108.249.179
| > | > | | Path:
| cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| > | > | | Xref: cpmsftngxa06.phx.gbl
| > microsoft.public.dotnet.languages.vb:145204
| > | > | | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | > | |
| > | > | | Hi there,
| > | > | |
| > | > | | Just wondering if I change the back and fore colour of a
listview
| > item
| > | > | when
| > | > | | the mouse hovers over it? I want to overide the default windows | > | colour.
| > | > | |
| > | > | | Can someone please tell me how to do this?
| > | > | |
| > | > | | Thanks
| > | > | | Devron
| > | > | |
| > | > | |
| > | > | |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #8
Hi, FM

Thanks for the heads up. I'll make sure Jeffrey knows about it.

Thanks

John Eikanger
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.

--------------------
| From: "FM" <fm****@telocity.com>
| References: <#E**************@TK2MSFTNGP12.phx.gbl>
<SQ**************@cpmsftngxa06.phx.gbl>
<jM*************@cpmsftngxa06.phx.gbl>
<O9**************@TK2MSFTNGP09.phx.gbl>
<RM**************@cpmsftngxa06.phx.gbl>
<OS**************@TK2MSFTNGP11.phx.gbl>
<xB**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Listview Highlight
| Date: Fri, 10 Oct 2003 11:55:40 -0400
| Lines: 211
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <u#**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: pool-141-150-215-203.delv.east.verizon.net
141.150.215.203
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145722
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| that links is bogus
|
|
|
| "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
| news:xB**************@cpmsftngxa06.phx.gbl...
| >
| > Hi Devron,
| >
| > I got it.
| > Because change the system color will effect all the control in the
system,
| > I think you should do the owner-draw to the ListView Control yourself.
| > To do ListView owner-draw in .Net C#, you can refer to this document:
| > http://dotnetclient/Whidbey/Runtime%.../OwnerDraw.doc
| >
| > Hope this helps,
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Devron Blatchford" <de****@auspine.com.au>
| > | References: <#E**************@TK2MSFTNGP12.phx.gbl>
| > <SQ**************@cpmsftngxa06.phx.gbl>
| > <jM*************@cpmsftngxa06.phx.gbl>
| > <O9**************@TK2MSFTNGP09.phx.gbl>
| > <RM**************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: Listview Highlight
| > | Date: Fri, 10 Oct 2003 13:14:36 +0930
| > | Lines: 151
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <OS**************@TK2MSFTNGP11.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | NNTP-Posting-Host: 203.108.249.179
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145570
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > |
| > | Basically I want to sepcify the selected colours myself insted of
using
| > the
| > | default windows colours. I can change the item colours but the
selected
| > | color is always the default system selected colour.
| > |
| > | I want to ovewrite this.
| > |
| > | Thanks
| > | Devron
| > |
| > |
| > |
| > | "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message
| > | news:RM**************@cpmsftngxa06.phx.gbl...
| > | >
| > | > Hi Devron,
| > | >
| > | > It seems that when you select the item, its backcolor and forecolor
| will
| > | > both been cleared and display the color of the system color(I mean
the
| > | > default selected mode item color ), so it needs not extra handle.
| > | >
| > | > For your second "change the default windows blue to another", I do
not
| > | > quite understand, can you explain to me more clear?
| > | >
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Devron Blatchford" <de****@auspine.com.au>
| > | > | References: <#E**************@TK2MSFTNGP12.phx.gbl>
| > | > <SQ**************@cpmsftngxa06.phx.gbl>
| > | > <jM*************@cpmsftngxa06.phx.gbl>
| > | > | Subject: Re: Listview Highlight
| > | > | Date: Thu, 9 Oct 2003 12:56:38 +0930
| > | > | Lines: 91
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <O9**************@TK2MSFTNGP09.phx.gbl>
| > | > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | > | NNTP-Posting-Host: 203.108.249.179
| > | > | Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| > | > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.vb:145221
| > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | > |
| > | > | Ok, that great and I can do that.
| > | > |
| > | > | Just one question. How do I stop the item being highlighted with
the
| > | > default
| > | > | blue once it is selected or change the default windows blue to
| another
| > | > | color?
| > | > |
| > | > | Thanks
| > | > | Devron
| > | > |
| > | > |
| > | > | "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in
message
| > | > | news:jM*************@cpmsftngxa06.phx.gbl...
| > | > | >
| > | > | > Hi Devron,
| > | > | >
| > | > | > Hit-test means that you calculate the mouse point is over which
| item
| > | by
| > | > | the
| > | > | > mouse's x, y coordinate and the height, width of every item.
| > | > | >
| > | > | > Hope this helps,
| > | > | > Best regards,
| > | > | > Jeffrey Tan
| > | > | > Microsoft Online Partner Support
| > | > | > Get Secure! - www.microsoft.com/security
| > | > | > This posting is provided "as is" with no warranties and confers
no
| > | > rights.
| > | > | >
| > | > | > --------------------
| > | > | > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | > | > | From: v-*****@online.microsoft.com (Jeffrey Tan[MSFT])
| > | > | > | Organization: Microsoft
| > | > | > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | > | > | Subject: RE: Listview Highlight
| > | > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | > | > | MIME-Version: 1.0
| > | > | > | Content-Type: text/plain
| > | > | > | Content-Transfer-Encoding: 7bit
| > | > | > |
| > | > | > |
| > | > | > | Hi Devron,
| > | > | > |
| > | > | > | I think you should do some hit-test yourself to determine the
| > mouse
| > | is
| > | > | > over
| > | > | > | which item.
| > | > | > | You can handle your hit-test code in MouseHover event, if you
| want
| > | to
| > | > | > | change its color not imediatly.
| > | > | > | If you want the item's color change imediatly, you can refer
to
| > the
| > | > | > | MouseEnter and MouseLeave event.
| > | > | > |
| > | > | > | If you still have any unclear, please feel free to let me
know.
| > | > | > |
| > | > | > | Best regards,
| > | > | > | Jeffrey Tan
| > | > | > | Microsoft Online Partner Support
| > | > | > | Get Secure! - www.microsoft.com/security
| > | > | > | This posting is provided "as is" with no warranties and
confers
| no
| > | > | rights.
| > | > | > |
| > | > | > | --------------------
| > | > | > | | From: "Devron Blatchford" <de****@auspine.com.au>
| > | > | > | | Subject: Listview Highlight
| > | > | > | | Date: Thu, 9 Oct 2003 10:09:42 +0930
| > | > | > | | Lines: 11
| > | > | > | | X-Priority: 3
| > | > | > | | X-MSMail-Priority: Normal
| > | > | > | | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | > | | Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>
| > | > | > | | Newsgroups: microsoft.public.dotnet.languages.vb
| > | > | > | | NNTP-Posting-Host: 203.108.249.179
| > | > | > | | Path:
| > | cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| > | > | > | | Xref: cpmsftngxa06.phx.gbl
| > | > microsoft.public.dotnet.languages.vb:145204
| > | > | > | | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > | > | > | |
| > | > | > | | Hi there,
| > | > | > | |
| > | > | > | | Just wondering if I change the back and fore colour of a
| > listview
| > | > item
| > | > | > | when
| > | > | > | | the mouse hovers over it? I want to overide the default
| windows
| > | > | colour.
| > | > | > | |
| > | > | > | | Can someone please tell me how to do this?
| > | > | > | |
| > | > | > | | Thanks
| > | > | > | | Devron
| > | > | > | |
| > | > | > | |
| > | > | > | |
| > | > | > |
| > | > | >
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #9

Hi,

There is a .Net C# samples related to ListView ownerdraw,
here is the link:
http://www.codeproject.com/cs/miscct...tomheader.asp?
print=true

Also, there is a Visual C++ sample, that is expose a full
ownerdraw feature:
http://www.codeguru.com/listview/supergrid.shtml

Hope all this helps, if you still have any questions,
please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and
confers no rights.

-----Original Message-----

Hi Devron,

I got it.
Because change the system color will effect all the control in the system,I think you should do the owner-draw to the ListView Control yourself.To do ListView owner-draw in .Net C#, you can refer to this document:http://dotnetclient/Whidbey/Runtime%.../OwnerDraw.doc

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "Devron Blatchford" <de****@auspine.com.au>
| References: <#E**************@TK2MSFTNGP12.phx.gbl>
<SQ**************@cpmsftngxa06.phx.gbl>
<jM*************@cpmsftngxa06.phx.gbl>
<O9**************@TK2MSFTNGP09.phx.gbl>
<RM**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Listview Highlight
| Date: Fri, 10 Oct 2003 13:14:36 +0930
| Lines: 151
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165| Message-ID: <OS**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl! TK2MSFTNGP11.phx.gbl| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145570| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Basically I want to sepcify the selected colours myself insted of usingthe
| default windows colours. I can change the item colours but the selected| color is always the default system selected colour.
|
| I want to ovewrite this.
|
| Thanks
| Devron
|
|
|
| "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message| news:RM**************@cpmsftngxa06.phx.gbl...
| >
| > Hi Devron,
| >
| > It seems that when you select the item, its backcolor and forecolor will| > both been cleared and display the color of the system color(I mean the| > default selected mode item color ), so it needs not extra handle.| >
| > For your second "change the default windows blue to another", I do not| > quite understand, can you explain to me more clear?
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers norights.
| >
| > --------------------
| > | From: "Devron Blatchford" <de****@auspine.com.au>
| > | References: <#E**************@TK2MSFTNGP12.phx.gbl>
| > <SQ**************@cpmsftngxa06.phx.gbl>
| > <jM*************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: Listview Highlight
| > | Date: Thu, 9 Oct 2003 12:56:38 +0930
| > | Lines: 91
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165| > | Message-ID: <O9**************@TK2MSFTNGP09.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | NNTP-Posting-Host: 203.108.249.179
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl! TK2MSFTNGP09.phx.gbl| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:145221| > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > |
| > | Ok, that great and I can do that.
| > |
| > | Just one question. How do I stop the item being highlighted with the| > default
| > | blue once it is selected or change the default windows blue to another| > | color?
| > |
| > | Thanks
| > | Devron
| > |
| > |
| > | "Jeffrey Tan[MSFT]" <v-*****@online.microsoft.com> wrote in message| > | news:jM*************@cpmsftngxa06.phx.gbl...
| > | >
| > | > Hi Devron,
| > | >
| > | > Hit-test means that you calculate the mouse point is over which item| by
| > | the
| > | > mouse's x, y coordinate and the height, width of every item.| > | >
| > | > Hope this helps,
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no| > rights.
| > | >
| > | > --------------------
| > | > | Newsgroups: microsoft.public.dotnet.languages.vb| > | > | From: v-*****@online.microsoft.com (Jeffrey Tan [MSFT])| > | > | Organization: Microsoft
| > | > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | > | Subject: RE: Listview Highlight
| > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain
| > | > | Content-Transfer-Encoding: 7bit
| > | > |
| > | > |
| > | > | Hi Devron,
| > | > |
| > | > | I think you should do some hit-test yourself to determine themouse
| is
| > | > over
| > | > | which item.
| > | > | You can handle your hit-test code in MouseHover event, if you want| to
| > | > | change its color not imediatly.
| > | > | If you want the item's color change imediatly, you can refer tothe
| > | > | MouseEnter and MouseLeave event.
| > | > |
| > | > | If you still have any unclear, please feel free to let me know.| > | > |
| > | > | Best regards,
| > | > | Jeffrey Tan
| > | > | Microsoft Online Partner Support
| > | > | Get Secure! - www.microsoft.com/security
| > | > | This posting is provided "as is" with no warranties and confers no| > | rights.
| > | > |
| > | > | --------------------
| > | > | | From: "Devron Blatchford" <de****@auspine.com.au>| > | > | | Subject: Listview Highlight
| > | > | | Date: Thu, 9 Oct 2003 10:09:42 +0930
| > | > | | Lines: 11
| > | > | | X-Priority: 3
| > | > | | X-MSMail-Priority: Normal
| > | > | | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158| > | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165| > | > | | Message-ID: <#E**************@TK2MSFTNGP12.phx.gbl>| > | > | | Newsgroups: microsoft.public.dotnet.languages.vb| > | > | | NNTP-Posting-Host: 203.108.249.179
| > | > | | Path:
| cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl! TK2MSFTNGP12.phx.gbl| > | > | | Xref: cpmsftngxa06.phx.gbl
| > microsoft.public.dotnet.languages.vb:145204
| > | > | | X-Tomcat-NG: microsoft.public.dotnet.languages.vb| > | > | |
| > | > | | Hi there,
| > | > | |
| > | > | | Just wondering if I change the back and fore colour of alistview
| > item
| > | > | when
| > | > | | the mouse hovers over it? I want to overide the default windows| > | colour.
| > | > | |
| > | > | | Can someone please tell me how to do this?
| > | > | |
| > | > | | Thanks
| > | > | | Devron
| > | > | |
| > | > | |
| > | > | |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

.

Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Angel Monson | last post by:
Is there a way I can find out which item I double-clicked inside a listview? And what about with subitems? And once I get an item number, can I use it to read the item and subitem contents? And if...
0
by: Martin Streller | last post by:
Hello, The code below represents a simple ownerdrawn, Listview class in C#. Its purpose is to avoid the flicker of the MS ListView. So I can't fall back to their one. Does anybody know why I...
0
by: willow1480 | last post by:
I am developing a small little Service Control Application. I am using a listview control with checkboxes and getting the list of services I want to control from a text file. When you check a...
1
by: cider123 | last post by:
I've tried working with the SelectedIndices and Items.Selected attributes to get the problem to go away, but not having any luck. Questions I have are: 1) How do you move (using code) the...
4
by: Shane | last post by:
I have a text box select items in a listview as text is being typed into the text box. I get the select bar to move correctly in the Listview control. If the user presses the down or up key in...
2
by: Niels Jensen | last post by:
Hi all, I have a listview and a textbox. when I select a row in the listview I want to be able to click on the textbox and type in some details. This obviously works fine - however when I...
7
by: > Adrian | last post by:
How do I change the ListView Header Color? If you know how to do it, please give a code example. Adrian. (I placed this question in another newsgroup by error.)
0
by: dm3281 | last post by:
I'm using C# and .NET 2.0 and have a WinForm application that contains a ListView control. 1) Is there a way that I can highlight a particular column when a column header is clicked? I'm...
6
by: Rich Raffenetti | last post by:
I have a form with a listview control and a textbox. When I change focus from the listview to the textbox, the highlighted item on the listview loses the highlight. That is not the behavior I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.