hi Silvio,
as i can say a normal Combobox can only change Color for all Items
to change it for special Item you need Ownerdraw.
i know that Fivewin have
but i have not find out how it work so i wrote my own Method
here a CODE snip which i use
oCombo_left:bOwnerDraw := { | a, b, c, d | oExpl_Left:DoMyComBo( a, b, c, d, @acItem, @acType, @acBitmaps, oCombo_left ) }
METHOD DoMyComBo() CLASS TExplorer
LOCAL WinDir := GETENV( "Windir" )
LOCAL cPara := ""
LOCAL cAlign := nOr( DT_LEFT, DT_NOPREFIX )
LOCAL nIcoHandle := 0
LOCAL nSize := 32
LOCAL ii, nCount, xPara
LOCAL oSelf
LOCAL nIdCtl
LOCAL oStruc
LOCAL nPointer
LOCAL acItem, acType, cItemText, oObj
LOCAL CtlType
LOCAL CtlID
LOCAL itemID
LOCAL itemAction
LOCAL itemState
LOCAL hwndItem
LOCAL hDC
LOCAL aRect
LOCAL nLeft
LOCAL nTop
LOCAL nRight
LOCAL nBottom
LOCAL itemData
LOCAL cDLL
LOCAL hModule
LOCAL nResID := 0
LOCAL cBitmap, hBitMap, acBitmaps, aBitmaps
LOCAL OldAt := - 1
LOCAL BrushHiBack := CreateSolidBrush( BFcolor )
LOCAL BrushSysColor := CreateSolidBrush( BGcolor )
LOCAL aGrad := { ;
{ .5, BFcolor, BGcolor }, ;
{ .6, BGcolor, BFcolor } ;
}
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
oStruc := xPara
CASE ii = 4
nPointer := xPara
CASE ii = 5
acItem := xPara
CASE ii = 6
acType := xPara
CASE ii = 7
acBitmaps := xPara
CASE ii = 8
oObj := xPara
IF !EMPTY( oObj )
IF VALTYPE( oObj ) = "O"
OldAt := oObj:nAt
oObj:SetBitmaps( acBitmaps )
ENDIF
ENDIF
ENDCASE
NEXT
CtlType := oStruc:CtlType
CtlID := oStruc:CtlID
itemID := oStruc:itemID
itemAction := oStruc:itemAction
itemState := oStruc:itemState
hwndItem := oStruc:hwndItem
hDC := oStruc:hDC
aRect := oStruc:aRect
itemData := oStruc:itemData
nTop := aRect[ 1 ]
nLeft := aRect[ 2 ]
nBottom := aRect[ 3 ]
nRight := aRect[ 4 ]
IF CtlType = ODT_COMBOBOX .OR. CtlType = ODT_LISTBOX // .AND. CtlID =
SetBkMode( hDC, 1 ) // TRANSPARENT =1 OPAQUE =2
DO CASE
CASE itemAction = ODA_SELECT
FillRect( hDC, aRect, BrushSysColor )
SetTextColor( hDC, BFcolor )
CASE itemAction = ODA_DRAWENTIRE
IF OldAt = itemID + 1 .AND. oObj:IsOpen()
OldAt = - 1
IF BGColor = 256 * 256 * 256 - 1 // 16777215
// Msginfo("white")
FillRect( hDC, aRect, COLOR_MENUHILIGHT + 1 )
SetTextColor( hDC, GetSysColor( COLOR_MENU ) )
ELSE
GradientFill( hDC, aRect[ 1 ], aRect[ 2 ], aRect[ 3 ] - 1, aRect[ 4 ], aGrad, .t. )
// FillRect( hDC, aRect, BrushSysColor )
SetTextColor( hDC, BFcolor )
ENDIF
ELSE
FillRect( hDC, aRect, BrushSysColor )
SetTextColor( hDC, BFcolor )
ENDIF
CASE itemAction = ODA_FOCUS
IF BGColor = 256 * 256 * 256 - 1 // 16777215
FillRect( hDC, aRect, COLOR_MENUHILIGHT + 1 )
SetTextColor( hDC, GetSysColor( COLOR_MENU ) )
ELSE
GradientFill( hDC, aRect[ 1 ], aRect[ 2 ], aRect[ 3 ] - 1, aRect[ 4 ], aGrad, .t. )
// FillRect( hDC, aRect, BrushSysColor )
SetTextColor( hDC, BFcolor )
ENDIF
ENDCASE
