473,561 Members | 3,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3033

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.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145204
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| From: v-*****@online.mi crosoft.com (Jeffrey Tan[MSFT])
| Organization: Microsoft
| Date: Thu, 09 Oct 2003 02:42:05 GMT
| Subject: RE: Listview Highlight
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| | NNTP-Posting-Host: 203.108.249.179
| | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145204
| | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
news:jM******** *****@cpmsftngx a06.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.publi c.dotnet.langua ges.vb
| From: v-*****@online.mi crosoft.com (Jeffrey Tan[MSFT])
| Organization: Microsoft
| Date: Thu, 09 Oct 2003 02:42:05 GMT
| Subject: RE: Listview Highlight
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| | NNTP-Posting-Host: 203.108.249.179
| | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145204
| | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145221
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
| news:jM******** *****@cpmsftngx a06.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.publi c.dotnet.langua ges.vb
| > | From: v-*****@online.mi crosoft.com (Jeffrey Tan[MSFT])
| > | Organization: Microsoft
| > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | Subject: RE: Listview Highlight
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| > | | NNTP-Posting-Host: 203.108.249.179
| > | | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| > | | Xref: cpmsftngxa06.ph x.gbl
microsoft.publi c.dotnet.langua ges.vb:145204
| > | | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
news:RM******** ******@cpmsftng xa06.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.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145221
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
| news:jM******** *****@cpmsftngx a06.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.publi c.dotnet.langua ges.vb
| > | From: v-*****@online.mi crosoft.com (Jeffrey Tan[MSFT])
| > | Organization: Microsoft
| > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | Subject: RE: Listview Highlight
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| > | | NNTP-Posting-Host: 203.108.249.179
| > | | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl | > | | Xref: cpmsftngxa06.ph x.gbl
microsoft.publi c.dotnet.langua ges.vb:145204
| > | | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145570
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
| news:RM******** ******@cpmsftng xa06.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.publi c.dotnet.langua ges.vb
| > | NNTP-Posting-Host: 203.108.249.179
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145221
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
| > | news:jM******** *****@cpmsftngx a06.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.publi c.dotnet.langua ges.vb
| > | > | From: v-*****@online.mi crosoft.com (Jeffrey Tan[MSFT])
| > | > | Organization: Microsoft
| > | > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | > | Subject: RE: Listview Highlight
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| > | > | | NNTP-Posting-Host: 203.108.249.179
| > | > | | Path:
| cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| > | > | | Xref: cpmsftngxa06.ph x.gbl
| > microsoft.publi c.dotnet.langua ges.vb:145204
| > | > | | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
news:xB******** ******@cpmsftng xa06.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.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145570
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
| news:RM******** ******@cpmsftng xa06.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.publi c.dotnet.langua ges.vb
| > | NNTP-Posting-Host: 203.108.249.179
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145221 | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
| > | news:jM******** *****@cpmsftngx a06.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.publi c.dotnet.langua ges.vb
| > | > | From: v-*****@online.mi crosoft.com (Jeffrey Tan[MSFT])
| > | > | Organization: Microsoft
| > | > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | > | Subject: RE: Listview Highlight
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| > | > | | NNTP-Posting-Host: 203.108.249.179
| > | > | | Path:
| cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| > | > | | Xref: cpmsftngxa06.ph x.gbl
| > microsoft.publi c.dotnet.langua ges.vb:145204
| > | > | | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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****@telocit y.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.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: pool-141-150-215-203.delv.east.v erizon.net
141.150.215.203
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145722
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| that links is bogus
|
|
|
| "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:xB******** ******@cpmsftng xa06.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.publi c.dotnet.langua ges.vb
| > | NNTP-Posting-Host: 203.108.249.179
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145570
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message
| > | news:RM******** ******@cpmsftng xa06.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.publi c.dotnet.langua ges.vb
| > | > | NNTP-Posting-Host: 203.108.249.179
| > | > | Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| > | > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.vb:145221
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in
message
| > | > | news:jM******** *****@cpmsftngx a06.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.publi c.dotnet.langua ges.vb
| > | > | > | From: v-*****@online.mi crosoft.com (Jeffrey Tan[MSFT])
| > | > | > | Organization: Microsoft
| > | > | > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | > | > | Subject: RE: Listview Highlight
| > | > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb
| > | > | > | | NNTP-Posting-Host: 203.108.249.179
| > | > | > | | Path:
| > | cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| > | > | > | | Xref: cpmsftngxa06.ph x.gbl
| > | > microsoft.publi c.dotnet.langua ges.vb:145204
| > | > | > | | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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*********** ***@cpmsftngxa0 6.phx.gbl>
<jM*********** **@cpmsftngxa06 .phx.gbl>
<O9*********** ***@TK2MSFTNGP0 9.phx.gbl>
<RM*********** ***@cpmsftngxa0 6.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.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 203.108.249.179
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl! TK2MSFTNGP11.ph x.gbl| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145570| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message| news:RM******** ******@cpmsftng xa06.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.publi c.dotnet.langua ges.vb
| > | NNTP-Posting-Host: 203.108.249.179
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl! TK2MSFTNGP09.ph x.gbl| > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:145221| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.mi crosoft.com> wrote in message| > | news:jM******** *****@cpmsftngx a06.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.publi c.dotnet.langua ges.vb| > | > | From: v-*****@online.mi crosoft.com (Jeffrey Tan [MSFT])| > | > | Organization: Microsoft
| > | > | Date: Thu, 09 Oct 2003 02:42:05 GMT
| > | > | Subject: RE: Listview Highlight
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.publi c.dotnet.langua ges.vb| > | > | | NNTP-Posting-Host: 203.108.249.179
| > | > | | Path:
| cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl! TK2MSFTNGP12.ph x.gbl| > | > | | Xref: cpmsftngxa06.ph x.gbl
| > microsoft.publi c.dotnet.langua ges.vb:145204
| > | > | | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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
3110
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 I click on one item, what do I need to do in order for me to highlight that item I clicked in the following X items? Since I'll be displaying...
0
2607
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 cannot change the size of the ListView's font (ListView.Font) from e.g.
0
2322
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 checkbox, it should either stop the service or start the service depending on each respective service's status. I want the listView to update the...
1
5037
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 focus Rectangle when your Selected Index changes ? 2) If there are no selected rows, can that focus rectangle be removed? 3) What other quirks exist in...
4
4931
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 the text box, I want to move to the selected item in the listview box. The down or up arrow does set focus to the listview box and the selected...
2
3555
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 click on the textbox the selected row in the listview loses it's selection (the usual windows blue vanishes - as if no row was selected) is there any...
7
33993
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
272
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 currently doing this for a GridView control, but I wanted to use a ListView instead. 2) In addition to highlighting a column, if the column is selected,...
6
5653
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 need. I am using VB2008 express. I see that the behavior of a similar program in VB6 is the same. When the controls are a listbox and a textbox,...
0
7644
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7568
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7858
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8085
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6206
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5469
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3615
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1180
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.