| Author | Topic: oBrowse:customDrawCell |
---|
| AUGE_OHR | oBrowse:customDrawCell
on Mon, 03 May 2010 23:11:23 +0200hi,
what is wrong with this Code that :customDrawCell is not working ?
*** snip ***
oBrowse := XbpBrowse():new( oParent,, aPos, aSize,aPres, .F. )
IF XPPVER > 01900331
oBrowse:DrawMode := XBP_DRAW_OWNERADVANCED
oBrowse:useVisualStyle := .F.
ENDIF
oBrowse:ClipChildren := .T.
oBrowse:clipSiblings := .T.
oBrowse:cursorMode := XBPBRW_CURSOR_ROW
oBrowse:create()
IF XPPVER > 01900331
oBrowse:customDrawCell := {| oPS, aInfo, self | MyDraw(oPS, aInfo,
oBrowse) }
oBrowse:hScrollObject:UseVisualStyle := .T.
oBrowse:vScrollObject:UseVisualStyle := .T.
ENDIF
...
FUNCTION MyDraw(oPS, aInfo,oBrowse)
LOCAL nItem := aInfo[ XBP_DRAWINFO_ITEM ]
LOCAL nAction := aInfo[ XBP_DRAWINFO_ACTION ]
LOCAL nState := aInfo[ XBP_DRAWINFO_STATE ]
LOCAL aRect := aInfo[ XBP_DRAWINFO_RECT ]
LOCAL oCol := aInfo[ XBP_DRAWINFO_AREA ]
LOCAL oArea := aInfo[ XBP_DRAWINFO_COLUMN ]
LOCAL lRet := .F.
ALTD()
*** EOF ***
i never got to ALTD() so i "think" :customDrawCell does not work ?
is this a BUG ?
greetings by OHR
Jimmy |
| AUGE_OHR | Re: oBrowse:customDrawCell
on Wed, 05 May 2010 23:52:11 +0200hi,
nobody use :customDrawCell ?
greetings by OHR
Jimmy |
| J.A. Diego Kerejeta | Re: oBrowse:customDrawCell
on Thu, 06 May 2010 12:03:07 +0200Hi Jimmy,
> IF XPPVER > 01900331
> oBrowse:DrawMode := XBP_DRAW_OWNERADVANCED
> oBrowse:customDrawCell := {| oPS, aInfo, self | MyDraw(oPS, aInfo,
This seems to be necessary but not sufficient to activate the
"ownerdrawing". You must also enable it in some column.
oBrowse:create()
FOR nCont:= 1 TO 3
oColumn := XbpColumn():new( oBrowse,,,, aPP )
oColumn:dataLink := ....
IF nCont % 2 = 0
oColumn:drawMode:= XBP_DRAW_OWNER
oColumn:draw := {| oPS, aInfo, obj | .F. }
ENDIF
oBrowse:addColumn( oColumn )
NEXT
And then are evaluated the two codeblock
Regards. Diego |
| AUGE_OHR | Re: oBrowse:customDrawCell
on Fri, 07 May 2010 02:21:40 +0200hi,
> This seems to be necessary but not sufficient to activate the
> "ownerdrawing". You must also enable it in some column.
that make Sence ...
thx for Demo and Help
greetings by OHR
Jimmy |