[image][/image]

- cGHYY1.jpg (77.66 KiB) Viewed 1506 times
Greeting to All ,
I Tried to Do it in Grid Component , Something similar to ownerDraw , But it is not 100% , Because it's still flickering sometime . It´s like the windows receveing a message and paint its Background with Default Color.
nIndexEve1 := EventCreate( { || LabelEventH4() } , ListView_GetHeader(GetControlHandle( 'br_grid', cActiveJan )) )
Function xDrawHead()
//Local nHWnd := ListView_GetHeader(GetControlHandle( 'br_grid', cFormPrin ))
Local aMtrHeader := xGetHeader()
Local nHWnd := ListView_GetHeader(GetControlHandle( 'br_grid', cActiveJan ))
Local aM1 := {}
Local aTams1 := xGetInfoHead('TAM')
Local n1
For n1 := 1 To Len(aMtrHeader)
//Aadd(aM1 , hb_OemToAnsi(aMtrHeader[n1]) )
Aadd(aM1 , hb_Utf8ToStr(aMtrHeader[n1]) )
Aadd(aTams1 , aTams1[n1] )
Next
ControlBackX( nHWnd , {255,121,12} , aM1 , Len(aMtrHeader) , aTams1 , nColSel , nColOrder , 'img\setaa.bmp' , 'img\setab.bmp' , lAscendente )
Return
FUNCTION LabelEventH4(aLabel)
If (nMsg == WM_PAINT)
If !lInvalid
xDrawHead()
End If
End If
And whein i need to Repaint in the Correct Color(Header Backcolor of the Grid) , i do This.
If _isControlDefined( 'br_grid' , cactivejan )
BT_SCR_INVALIDATERECT( ListView_GetHeader(GetControlHandle( 'br_grid', cActivejan )) , Nil , .t. )
End If
To repeat the Process.

- c1.jpg (47 KiB) Viewed 1506 times

- c2.jpg (55.72 KiB) Viewed 1506 times
Anyone Know how to Fix This problem?