How can I achieve using a standard listview control - I do not wish to use
bBrowser.
Regards
Jeff
For a good explanation and samples go to Michael Ferber page:
http://ourworld.compuserve.com/homepages/ferbermichael/
and click on the CA-Visual Objects link, where you will find
'OwnerDraw' and 'CustomDraw'. Follow this link...
HTH,
Amilcar A. Camargo F.
Sand, S. A.
Guatemala, C. A.
(pls remove leading underscore to e-mail)
Why not? Its vastly superior. Vastly!
You must have some sort of stock in bBrowser.
Rob
"Geoff Schaller" <geof...@bigpond.net.au> wrote in message
news:ec3qa.9949$8K2....@news-server.bigpond.net.au...
Here is how to set the background color of the listview:
SendMessage( SELF:oDCListView:Handle() , LVM_SETBKCOLOR , 0 , LONG ( _CAST,
RGB( SELF:oBackColor:Red, SELF:oBackColor:Green, SELF:oBackColor:Blue ) ) )
Here is how to set the color of Individual items:
METHOD ControlNotify( oEvent ) CLASS FormPropertyLegends_STD
LOCAL pNMCustomDraw AS _WINNMLVCUSTOMDRAW
//
//s
//
// REP: 02.11.2003 - Created.
SUPER:ControlNotify( oEvent )
IF (oEvent:NotifyCode = NM_CUSTOMDRAW)
// Take the default processing unless we set this to something else below.
SELF:EventReturnValue := CDRF_DODEFAULT
pNMCustomDraw := PTR( _CAST , oEvent:lParam )
// First thing - check the draw stage. If it's the control's prepaint
stage,
// then tell Windows we want messages for every item.
IF (pNMCustomDraw.nmcd.dwDrawStage == CDDS_PREPAINT)
SELF:EventReturnValue := CDRF_NOTIFYITEMDRAW
// ELSEIF (pNMCustomDraw.nmcd.dwDrawStage == CDDS_ITEMPREPAINT )
// This is the notification message for an item. We'll request
// notifications before each subitem's prepaint stage.
// SELF:EventReturnValue := CDRF_NOTIFYITEMDRAW // CDRF_NOTIFYSUBITEMDRAW
// Tone( 500, 1 )
ELSEIF LOGIC( _CAST, _Or( pNMCustomDraw.nmcd.dwDrawStage,
CDDS_ITEMPREPAINT, CDDS_SUBITEM ) )
// This is the prepaint stage for a subitem. Here's where we set
the
// item's text and background colors. Our return value will tell
// Windows to draw the subitem itself, but it will use the new
colors
// we set here.
IF _and( pNMCustomDraw.nmcd.uItemState, CDIS_SELECTED ) <> 0
pNMCustomDraw.clrText := RGB( 0, 0, 0 )
pNMCustomDraw.clrTextBk := RGB( 0, 0, 0 )
ELSE
// Set the column text color.
pNMCustomDraw.clrText := RGB( 255, 0, 0 )
// Set the column background color.
pNMCustomDraw.clrTextBk := RGB( 0, 0, 0 )
ENDIF
// Tell Windows to paint the control itself.
SELF:EventReturnValue := CDRF_NOTIFYITEMDRAW // CDRF_DODEFAULT
ENDIF
ENDIF
RETURN
Hope this helps.
Cheers,
Rob Panosh
"Jeff Williams" <jeff.w...@NO-SPAM.hardsoft.com.au> wrote in message
news:3ea86...@news.iprimus.com.au...
oBrowser:Background := Color{250,0,120}
...and conditional colouring is just two more lines.
<g>
"Rob Panosh" <rob_p...@asdsoftware.com> wrote in message
news:3ea93fef$1...@news.splitrock.net...
When I dealt with ListViews, I called myself a masochist <g>.
"Rob Panosh" <rob_p...@asdsoftware.com> wrote in message
news:3ea93f25$1...@news.splitrock.net...
My home is not far from house, where Leopold von Sacher-Masoch was born. Now I
know why I'm still using listview.<g>
"Igor Kaliniak" <rem_i...@gal.ukrpack.net> wrote in message
news:3eaa5...@news.ukrpack.net...
"Guy Deprez" <DPZ...@attglobal.net> wrote in message
news:3ead6b6f...@32.112.2.68...
Backgound color of the ListView text items? so easy! :-)
ListView:TextBackgroundColor Access/Assign
Description:
A Color object used to paint the text background in the list view.
Best Regards,
Saulo
Rio - Brazil
Geoff
(PS ...and we used the same code Rob did for treeviews and listviews)
"Saulo Rodrigues" <saulo...@joaofortes.com.br> wrote in message
news:b8olsn$bedop$1...@ID-149048.news.dfncis.de...