hi,
have try ComboBox Ownerdraw and "fill" bOwnerDraw with Codeblock
- Code: Select all Expand view RUN
oCombo_left:bOwnerDraw := {|a,b,c,d| DoMyComBo(a,b,c,d) }
- Code: Select all Expand view RUN
FUNCTION DoMyComBo()
nCount := PCOUNT()
FOR ii := 1 TO nCount
xPara := PValue(ii)
DO CASE
CASE ii = 1 ; oSelf := xPara
CASE ii = 2 ; nIdCtl := xPara
CASE ii = 3 ; aStruc := xPara
CASE ii = 4 ; nPointer := xPara
ENDCASE
NEXT
fwlog "DoMyComBo()",nCount, IF(VALTYPE(oSelf) = "O","Object",oSelf) , nIdCtl , VAR2CHAR( aStruc ), nPointer
RETURN 0
Parameter a,b,c,d between "Pipe" (|) come from
- Code: Select all Expand view RUN
uVal := Eval( ::bOwnerDraw, Self, nIdCtl, TDrawItemStruct():New( nPStruct ), nPStruct )
Result
"DoMyComBo()" = "DoMyComBo()"
nCount = 4
IF(VALTYPE(oSelf) = "O","Object",oSelf) = "Object"
nIdCtl = 109
VAR2CHAR( aStruc ) = "__itemSetObj( {{CTLTYPE, 3}, {CTLID, 109}, {ITEMID, 0}, {ITEMACTION, 1}, {ITEMSTATE, 4096}, {HWNDITEM, 1770774}, {HDC, 1157698194}, {ARECT, {3, 3, 35, 70}}, {ITEMDATA, `ę}}, {{TDRAWITEMSTRUCT,}} )"
nPointer = 1373540
it seems to have what is need for Ownerdraw ComboBox ... now work can begin