Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #6117 > unrolled thread
| Started by | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| First post | 2013-10-19 12:50 -0700 |
| Last post | 2013-10-29 20:50 +0100 |
| Articles | 13 — 7 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Change the default color of a specific item in a ListView George Tritsos <GeorgeTritsos@yahoo.gr> - 2013-10-19 12:50 -0700
Re: Change the default color of a specific item in a ListView "Wolfgang Riedmann" <wriedmann@gmail.com> - 2013-10-20 09:09 +0200
Re: Change the default color of a specific item in a ListView George Tritsos <GeorgeTritsos@yahoo.gr> - 2013-10-20 00:30 -0700
Re: Change the default color of a specific item in a ListView D.J.W. van Kooten <public@ic2remove.this.com> - 2013-10-20 09:15 +0200
Re: Change the default color of a specific item in a ListView George Tritsos <GeorgeTritsos@yahoo.gr> - 2013-10-20 00:36 -0700
Re: Change the default color of a specific item in a ListView George Tritsos <GeorgeTritsos@yahoo.gr> - 2013-10-21 01:15 -0700
Re: Change the default color of a specific item in a ListView Fabio Romling Rotheia <fabio@kosmosdistribuidora.com.br> - 2013-10-21 06:37 -0700
Re: Change the default color of a specific item in a ListView D.J.W. van Kooten <public@ic2remove.this.com> - 2013-10-21 18:05 +0200
Re: Change the default color of a specific item in a ListView jmmnorthwood@gmail.com - 2013-10-21 11:46 -0700
Re: Change the default color of a specific item in a ListView Paulo Oliveira <paulo@clipinfor.com> - 2013-10-29 02:44 -0700
Re: Change the default color of a specific item in a ListView antoshkovsp@gmail.com - 2013-10-29 04:20 -0700
Re: Change the default color of a specific item in a ListView Fabio Romling Rotheia <fabio@kosmosdistribuidora.com.br> - 2013-10-21 06:43 -0700
Re: Change the default color of a specific item in a ListView D.J.W. van Kooten <public@ic2remove.this.com> - 2013-10-29 20:50 +0100
| From | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| Date | 2013-10-19 12:50 -0700 |
| Subject | Change the default color of a specific item in a ListView |
| Message-ID | <5407bd97-884b-4d74-bf36-3f30b90be2fe@googlegroups.com> |
Hi all, I want to change the color of a specific item in a List View. e.g. 2nd line 1st column and 3rd line 1st column red color Is it possible? Thanks in advance George
[toc] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2013-10-20 09:09 +0200 |
| Message-ID | <bchdtkF949qU1@mid.individual.net> |
| In reply to | #6117 |
Hi George, > I want to change the color of a specific item in a List View. > > e.g. 2nd line 1st column and 3rd line 1st column red color > > Is it possible? yes, this is possible using ownerdraw and the Windows API, but not with the basic VO classes. Wolfgang --
[toc] | [prev] | [next] | [standalone]
| From | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| Date | 2013-10-20 00:30 -0700 |
| Message-ID | <9948dc64-762f-47b4-bf86-5cabc02e1245@googlegroups.com> |
| In reply to | #6119 |
Hi Wolfgang, is there a sample to see how it works? Regards George
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2013-10-20 09:15 +0200 |
| Message-ID | <ia0769hr1uvnufi9i05ncgcjvfar5bssla@4ax.com> |
| In reply to | #6117 |
On Sat, 19 Oct 2013 12:50:55 -0700 (PDT), George Tritsos <GeorgeTritsos@yahoo.gr> wrote: Hello George, > I want to change the color of a specific item in a List View. > >e.g. 2nd line 1st column and 3rd line 1st column red color > >Is it possible? > Yes. First you will need the Common Control MEF (if you don't have that somewhere, drop me a mail and I'll send it to you). After that it will look something like this, in the ControlNotify of your LV. For a so called iSubitem (= a column) I inspect the content and colour it green or red. METHOD ControlNotify(oEvent) CLASS ToDoExplorer LOCAL pNMCustomDraw AS _WINNMLVCUSTOMDRAW LOCAL dwDrawStage AS DWORD LOCAL dwItem AS DWORD LOCAL oItem AS ListViewItem LOCAL dCode AS DWORD dCode := oEvent:NotifyCode IF dCode = NM_CUSTOMDRAW .AND. IsInstanceOf( oEvent:control, #LISTVIEW ) pNMCustomDraw := PTR( _CAST , oEvent:lParam ) dwDrawStage := pNMCustomDraw.nmcd.dwDrawStage DO CASE CASE dwDrawStage = CDDS_PREPAINT SELF:EventReturnValue := CDRF_NOTIFYITEMDRAW CASE _AND( dwDrawStage , CDDS_ITEMPREPAINT ) > 0 dwItem := pNMCustomDraw.nmcd.dwItemSpec DO CASE // dwItem contains the 0-based item and // pNMCustomDraw.iSubItem contains the 0-based subitem == column CASE pNMCustomDraw.iSubItem==1 // 1 is my first column oItem:=SELF:oLV:GetNextitem(LV_GNIBYITEM,,,,,dwItem) pNMCustomDraw.clrText := DWORD(RGB( 0 , 0 , 0 )) // black IF oItem:GetText( #DONE)=Vt(CLM_YES,"Yes") pNMCustomDraw.clrTextBk := DWORD(RGB( 150 , 220 , 160 ) ) // Light green ELSE pNMCustomDraw.clrTextBk := DWORD(RGB( 250 , 130 , 130 )) //l Light red ENDIF ENDCASE RETURN SELF:EventReturnValue ENDIF RETURN SUPER:ControlNotify( oEvent ) Dick
[toc] | [prev] | [next] | [standalone]
| From | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| Date | 2013-10-20 00:36 -0700 |
| Message-ID | <65a2ba2c-199c-4a29-b308-4cda227b6e59@googlegroups.com> |
| In reply to | #6120 |
Hi Dick My email is "GeorgeTritsos@yahoo.gr" Thanks George
[toc] | [prev] | [next] | [standalone]
| From | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| Date | 2013-10-21 01:15 -0700 |
| Message-ID | <6d966649-94bd-46ed-9479-3ac82d636854@googlegroups.com> |
| In reply to | #6122 |
Hi Dick, I received your email with MEF file and now it's time for work. Million thanks George
[toc] | [prev] | [next] | [standalone]
| From | Fabio Romling Rotheia <fabio@kosmosdistribuidora.com.br> |
|---|---|
| Date | 2013-10-21 06:37 -0700 |
| Message-ID | <6aa5aa3c-88bb-48de-80db-4b4b23dbbb86@googlegroups.com> |
| In reply to | #6120 |
Hi Dick! Can you also send me the MEF file? fabio@kosmosdistribuidora.com.br Thanks, Fábio.
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2013-10-21 18:05 +0200 |
| Message-ID | <36ka69t9ljcb8m6pkuj43sc1mjefgtkgrd@4ax.com> |
| In reply to | #6126 |
On Mon, 21 Oct 2013 06:37:03 -0700 (PDT), Fabio Romling Rotheia <fabio@kosmosdistribuidora.com.br> wrote: Hello Fábio, >Can you also send me the MEF file? >fabio@kosmosdistribuidora.com.br > Done! Dick
[toc] | [prev] | [next] | [standalone]
| From | jmmnorthwood@gmail.com |
|---|---|
| Date | 2013-10-21 11:46 -0700 |
| Message-ID | <6a21c2b1-4f89-4a3e-8244-f1dfcde186ab@googlegroups.com> |
| In reply to | #6128 |
I would appreciate the MEF too. (jmmicmc@gmail.com) Thanks. James On Monday, 21 October 2013 12:05:40 UTC-4, D. J. W. van Kooten wrote: > On Mon, 21 Oct 2013 06:37:03 -0700 (PDT), Fabio Romling Rotheia > > <fabio@kosmosdistribuidora.com.br> wrote: > > > > Hello Fábio, > > > > >Can you also send me the MEF file? > > >fabio@kosmosdistribuidora.com.br > > > > > Done! > > > > Dick
[toc] | [prev] | [next] | [standalone]
| From | Paulo Oliveira <paulo@clipinfor.com> |
|---|---|
| Date | 2013-10-29 02:44 -0700 |
| Message-ID | <6983bd34-be7a-476b-a4c4-15f166ce5226@googlegroups.com> |
| In reply to | #6129 |
Can you also send me the MEF Thanks Paulo
[toc] | [prev] | [next] | [standalone]
| From | antoshkovsp@gmail.com |
|---|---|
| Date | 2013-10-29 04:20 -0700 |
| Message-ID | <5357e952-7bff-4523-a991-f63579738914@googlegroups.com> |
| In reply to | #6120 |
Hi George! Hi Dick! Can you guys also send me the MEF? my e-mail is: antoshkov@mail.ru Thanks, Sergey A
[toc] | [prev] | [next] | [standalone]
| From | Fabio Romling Rotheia <fabio@kosmosdistribuidora.com.br> |
|---|---|
| Date | 2013-10-21 06:43 -0700 |
| Message-ID | <98339309-8f0d-4c3e-a282-1f95ad5c95cf@googlegroups.com> |
| In reply to | #6117 |
Hi George! Hi Dick! Can you guys also send me the MEF? my e-mail is: fabio@kosmosdistribuidora.com.br Thanks, Fabio.
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2013-10-29 20:50 +0100 |
| Message-ID | <qb407996njijdm1kg5bnd1qqqqk1s5137e@4ax.com> |
| In reply to | #6127 |
On Mon, 21 Oct 2013 06:43:34 -0700 (PDT), Fabio Romling Rotheia <fabio@kosmosdistribuidora.com.br> wrote: > >Can you guys also send me the MEF? >my e-mail is: fabio@kosmosdistribuidora.com.br > >Thanks, > Hello Fabio, Sure! Just sent it to you and Sergey. Dick
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web