1. listview items colors
- Posted by tone.skoda at gmx.net Jun 13, 2002
- 553 views
i didn't find any function to set text color (or background color) for one listview item. is it in win32lib? if not it would be good if this would be possible, also for treeview items. it can be done by custom painting items. for treeview, i used NM_CUSTOMDRAW to paint multi-line items.
2. Re: listview items colors
- Posted by tone.skoda at gmx.net Jun 14, 2002
- 658 views
Didn't this get thru!?? I'm saying I can do this if it will be in next release of win32lib? Derek? ----- Original Message ----- From: <tone.skoda at gmx.net> To: "EUforum" <EUforum at topica.com> Subject: listview items colors > > i didn't find any function to set text color (or background color) for one > listview item. > is it in win32lib? > if not it would be good if this would be possible, also for treeview items. > > it can be done by custom painting items. > for treeview, i used NM_CUSTOMDRAW to paint multi-line items. > > > >
3. Re: listview items colors
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 15, 2002
- 551 views
If you want to set the colour of specific rows and columns, you have to use the customdraw facilities. Generally this is too specific to place into the library but maybe I can add some assitance for this in a later edition. --------------- Derek. ----- Original Message ----- From: <tone.skoda at gmx.net> To: "EUforum" <EUforum at topica.com> Subject: Re: listview items colors > > Didn't this get thru!?? > I'm saying I can do this if it will be in next release of win32lib? Derek? > > ----- Original Message ----- > From: <tone.skoda at gmx.net> > To: "EUforum" <EUforum at topica.com> > Sent: Thursday, June 13, 2002 8:37 PM > Subject: listview items colors > > > > > > i didn't find any function to set text color (or background color) for one > > listview item. > > is it in win32lib? > > if not it would be good if this would be possible, also for treeview > items. > > > > it can be done by custom painting items. > > for treeview, i used NM_CUSTOMDRAW to paint multi-line items. > > > > > > > > >
4. Re: listview items colors
- Posted by tone.skoda at gmx.net Jun 15, 2002
- 522 views
I don't agree that it's too specific. Users should be able to use existing routine setTextColor () to set text color for listview, treeview... items. ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: Re: listview items colors > > If you want to set the colour of specific rows and columns, you have to use > the customdraw facilities. Generally this is too specific to place into the > library but maybe I can add some assitance for this in a later edition. > --------------- > Derek. > > ----- Original Message ----- > From: <tone.skoda at gmx.net> > To: "EUforum" <EUforum at topica.com> > Sent: Friday, June 14, 2002 5:35 PM > Subject: Re: listview items colors > > > > > > Didn't this get thru!?? > > I'm saying I can do this if it will be in next release of win32lib? Derek? > > > > ----- Original Message ----- > > From: <tone.skoda at gmx.net> > > To: "EUforum" <EUforum at topica.com> > > Sent: Thursday, June 13, 2002 8:37 PM > > Subject: listview items colors > > > > > > > > > > i didn't find any function to set text color (or background color) for > one > > > listview item. > > > is it in win32lib? > > > if not it would be good if this would be possible, also for treeview > > items. > > > > > > it can be done by custom painting items. > > > for treeview, i used NM_CUSTOMDRAW to paint multi-line items. > > > > > > > > > > > >
5. Re: listview items colors
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 15, 2002
- 543 views
I guess what I was trying to say was that because CUSTOMDRAWN controls require a lot of work, namely they must do ALL the rendering, it would be difficult to generalise this and place it into the library. I'd be glad to be proven wrong. Show me how it can be done and I'll try to include it. I agree that it appears to be an oversight on Microsoft's part that makes it difficult to color individual items. ---------- Derek. ----- Original Message ----- From: <tone.skoda at gmx.net> To: "EUforum" <EUforum at topica.com> Sent: Sunday, June 16, 2002 10:11 AM Subject: Re: listview items colors > > I don't agree that it's too specific. Users should be able to use existing > routine setTextColor () to set text color for listview, treeview... items. > > ----- Original Message ----- > From: "Derek Parnell" <ddparnell at bigpond.com> > To: "EUforum" <EUforum at topica.com> > Sent: Saturday, June 15, 2002 6:54 PM > Subject: Re: listview items colors > > > > > > If you want to set the colour of specific rows and columns, you have to > use > > the customdraw facilities. Generally this is too specific to place into > the > > library but maybe I can add some assitance for this in a later edition. > > --------------- > > Derek. > > > > ----- Original Message ----- > > From: <tone.skoda at gmx.net> > > To: "EUforum" <EUforum at topica.com> > > Sent: Friday, June 14, 2002 5:35 PM > > Subject: Re: listview items colors > > > > > > > > > > Didn't this get thru!?? > > > I'm saying I can do this if it will be in next release of win32lib? > Derek? > > > > > > ----- Original Message ----- > > > From: <tone.skoda at gmx.net> > > > To: "EUforum" <EUforum at topica.com> > > > Sent: Thursday, June 13, 2002 8:37 PM > > > Subject: listview items colors > > > > > > > > > > > > > > i didn't find any function to set text color (or background color) for > > one > > > > listview item. > > > > is it in win32lib? > > > > if not it would be good if this would be possible, also for treeview > > > items. > > > > > > > > it can be done by custom painting items. > > > > for treeview, i used NM_CUSTOMDRAW to paint multi-line items. > > > > > > > > > > > > > > >
6. Re: listview items colors
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 15, 2002
- 543 views
Tony, for ListView and treeview controls its not quite that bad, but still a sigificant amount of housekeeping is required to support the generic case. At this stage, I would welcome somebody else doing the first cut otherwise the idea will have to wait until I get around to it. ----------- Derek. ----- Original Message ----- From: "Tony Steward" <tony at locksdownunder.com> To: "EUforum" <EUforum at topica.com> Sent: Sunday, June 16, 2002 4:17 PM Subject: RE: listview items colors > > I certainly don't know how to implement this but so I understand, are > you saying that you would have to draw the entire LV yourself? > > I'd like to see it called something like this: > addLVItem(MyLV, MyIcon, {data1, data2, data3},{color1, color2, color3}) > and > addLVItem(MyLV, MyIcon, {data1, data2, data3},default) > > etc. I think you'll get the idea. > > Just my 2c. > Thanks > Tony Steward > > Derek Parnell wrote: > > I guess what I was trying to say was that because CUSTOMDRAWN controls > > require a lot of work, namely they must do ALL the rendering, it would > > be > > difficult to generalise this and place it into the library. I'd be glad > > to > > be proven wrong. Show me how it can be done and I'll try to include it. > > > > I agree that it appears to be an oversight on Microsoft's part that > > makes it > > difficult to color individual items. > > ---------- > > Derek. > > > > ----- Original Message ----- > > From: <tone.skoda at gmx.net> > > To: "EUforum" <EUforum at topica.com> > > Sent: Sunday, June 16, 2002 10:11 AM > > Subject: Re: listview items colors > > > > > > > > > > I don't agree that it's too specific. Users should be able to use > > > existing > > > routine setTextColor () to set text color for listview, treeview... > > > items. > > > > > > ----- Original Message ----- > > > From: "Derek Parnell" <ddparnell at bigpond.com> > > > To: "EUforum" <EUforum at topica.com> > > > Sent: Saturday, June 15, 2002 6:54 PM > > > Subject: Re: listview items colors > > > > > > > > > > > > > > If you want to set the colour of specific rows and columns, you have to > > > use > > > > the customdraw facilities. Generally this is too specific to place into > > > the > > > > library but maybe I can add some assitance for this in a later edition. > > > > --------------- > > > > Derek. > > > > > > > > ----- Original Message ----- > > > > From: <tone.skoda at gmx.net> > > > > To: "EUforum" <EUforum at topica.com> > > > > Sent: Friday, June 14, 2002 5:35 PM > > > > Subject: Re: listview items colors > > > > > > > > > > > > > > > > > > Didn't this get thru!?? > > > > > I'm saying I can do this if it will be in next release of win32lib? > > > Derek? > > > > > > > > > > ----- Original Message ----- > > > > > From: <tone.skoda at gmx.net> > > > > > To: "EUforum" <EUforum at topica.com> > > > > > Sent: Thursday, June 13, 2002 8:37 PM > > > > > Subject: listview items colors > > > > > > > > > > > > > > > > > > > > > > i didn't find any function to set text color (or background color) > > for > > > > one > > > > > > listview item. > > > > > > is it in win32lib? > > > > > > if not it would be good if this would be possible, also for treeview > > > > > items. > > > > > > > > > > > > it can be done by custom painting items. > > > > > > for treeview, i used NM_CUSTOMDRAW to paint multi-line items. > > > > > > > > > > > > > > > > > > > > > >
7. Re: listview items colors
- Posted by tone.skoda at gmx.net Jun 16, 2002
- 555 views
This is a multi-part message in MIME format. ------=_NextPart_000_002D_01C21583.2E9B3D60 charset="iso-8859-2" Attached is a library for Win32Lib v0.57.7 with demo to create colored list view and tree view items. global routines are: set_tv_item_text_color set_tv_item_bk_color set_lv_item_text_color set_lv_item_bk_color For listviews you are able to set same color for the whole row, not every item in row with different color. I didn't know of setUserProperty() functions. With them it is much easier to create libraries for win32lib. I'm not sure if they're fast? And are you able to use ids of items for first parameter, or are only ids of windows valid? Also, I think they have some bugs, that's why background color of one item in treeview will be black which is not right. Here it goes: First of, why does this display 1 and not 10: defineUserProperty (Win, 1, 10) ?getUserProperty (Win, 1) Secondly, here must be bug: defineUserProperty (Win, 1, 10) setUserProperty (Win, 1, 10) ?getUserProperty (Win, 1) defineUserProperty (Win, 2, 20) ?getUserProperty (Win, 1) setUserProperty (Win, 2, 20) ?getUserProperty (Win, 1) It outputs this: {10} {1} {1} instead of this: {10} {10} {10} ------=_NextPart_000_002D_01C21583.2E9B3D60 Content-Type: application/x-compressed; name="TVLV_Items_Colors.zip"