Is it possible to have listviewitems with differing text properties ?
I.e. like unread emails within outlook etc. Bold when unread then normal
when read.
If this is possible, is it also possible to change the colour of a listview
item line ?
Adrian
I've lost one and it would be just my luck that thats the one.
Thanks for your help Geoff
Regards
Adrian
Geoff Schaller <geof...@bigpond.net.au> wrote in message
news:_drl6.42214$o85.2...@news-server.bigpond.net.au...
> Adrian,
>
> Here is some stuff I got out of KnowVO. The short answer is "Yes" but the
> process is a little more complex than usual.Also, if you SDT, Ivo Wessels
> ran a series of articles on how to do this.
>
> Geoff
>
>
> "Adrian Scott" <adr...@compan.net> wrote in message
> news:982923320.10183.0...@news.demon.co.uk...
Regards, Erik Visser
METHOD Postinit CLASS JuryExplorer
aFonts := {;
Font{,10,"MS Sans Serif"},;
Font{,10,"MS Sans Serif"},;
Font{,10,"MS Sans Serif"},;
Font{,10,"MS Sans Serif"},;
}
aFonts[2]:bold := TRUE
aFonts[3]:underline := TRUE
aFonts[4]:bold := TRUE
aFonts[4]:underline := TRUE
METHOD ControlNotify( oControlNotifyEvent ) CLASS JuryExplorer
LOCAL oEvent AS ControlNotifyEvent
LOCAL strucNMLV AS _winNM_Listview
LOCAL strucLVCD AS _winNMLVCustomDraw
LOCAL oLVI AS ListviewItem
LOCAL sText AS STRING
LOCAL wVal AS WORD
oEvent := oControlNotifyEvent
DO CASE
CASE oEvent:umsg == WM_NOTIFY
strucNMLV := PTR( _CAST, oEvent:lParam )
DO CASE
CASE strucNMLV.hdr._COde != NM_CUSTOMDRAW
//do nothing
CASE IsInstanceOf( oEvent:control, #LISTVIEW )
strucLVCD := PTR(_CAST, oEvent:lParam )
DO CASE
CASE strucLVCD.nmcd.dwDrawStage == CDDS_PREPAINT
RETURN SELF:EventReturnValue := CDRF_NOTIFYITEMDRAW
CASE strucLVCD.nmcd.dwDrawStage == CDDS_ITEMPREPAINT
oLVI := oEvent:Control:GetItemAttributes(
strucLVCD.nmcd.dwItemSpec + 1 )
wVal := 1
IF oLVI:GetText(#ISBOLD) = ".T."
wVal+=1
ENDIF
IF oLVI:GetText(#ISUNDERLIN) = ".T."
wVal+=2
ENDIF
SelectObject( strucLVCD.nmcd.hdc, aFonts[wVal]:handle() )
RETURN SELF:EventReturnValue := CDRF_NOTIFYITEMDRAW
ENDCASE
ENDCASE
ENDCASE
RETURN SUPER:ControlNotify( oControlNotifyEvent )
"Adrian Scott" <adr...@compan.net> schreef in bericht
news:982923320.10183.0...@news.demon.co.uk...
SDT - 04/1999 & 01/2000 & 02/2000
--
HTH
Steve Quinn
Accept than some days you're the pigeon, and some days you're the statue.
There is no right way to do the wrong thing.
To invent, you need a good imagination and a pile of junk.
-- Thomas Edison
There is a very good paper from the CA-World 99 CD by Michael Ferber about
custom draw techniques ("OwnerDraw and CustomDraw Techniques in Windows").
This explains how to use the custom draw features quite well. I have used
it to highlight items in treeviews and list views in different colors and
fonts.
Adrian Scott <adr...@compan.net> wrote in message
news:982923320.10183.0...@news.demon.co.uk...
I tried this before but I couldn't get it working under VO 2.0 on a
data-window.
Somehow the ControlNotify() isnt' called.
Is there a simple solution to this ???
John Martens
Erik Visser <evi...@wilg.nl> schreef in berichtnieuws
975hpu$67h$1...@porthos.nl.uu.net...
> file://do nothing
> I tried this before but I couldn't get it working under VO 2.0 on a
> data-window.
> Somehow the ControlNotify() isnt' called.
>
> Is there a simple solution to this ???
Go to http://ourworld.compuserve.com/homepages/FerberMichael/ and read
the paper "OwnerDraw and CustomDraw Techniques in Windows". It shows how
to get the ControlNotify working for DataWindows.
--
Paul
----
Paul Piko
Piko Computing Consultants
Phone: +61 3 9432 1222 Fax: +61 3 9432 1255
Email: pa...@piko.com.au Web: http://www.piko.com.au
METHOD ControlNotify(oEvent) CLASS __FormDialogWindow
oParent:Owner:Dispatch(oEvent)
RETURN SELF
The demo AEF in itself doesn't work in Michaels case without the method.
Thanks for getting my attention to this.
John
Paul Piko <pa...@piko.com.au> schreef in berichtnieuws
eEDl6.43001$o85.2...@news-server.bigpond.net.au...
I've got the listview looking like I want now.
Cheers
Adrian
Roger Lawton <ro...@somax.com> wrote in message
news:975rok$llc$1...@slb3.atl.mindspring.net...