If I change nHeadBmpNo how do I repaint the header?
oCol:bLClickHeader := {|r,c,f,o| IIF( oCol:nHeadBmpNo = 2, oCol:nHeadBmpNo := 1 ,oCol:nHeadBmpNo := 2 ) )) }
PaintHeader??
Thanks in advance
Otto
STATIC FUNCTION Bitmaps( oWnd )
local oChild, oBrw, oCol, oFont
local nFor
DEFINE FONT oFont NAME "Arial" SIZE 0, -8 BOLD
DEFINE WINDOW oChild TITLE "Bitmaps on browse and bold font on first column" MDICHILD OF oWnd
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oCol := oBrw:AddCol()
oCol:AddResource( "CLIP" )
oCol:AddResource( "star" )
oCol:bLClickHeader = { | nMRow, nMCol, nFlags, Self | If( ::nHeadBmpNo == 2, ::nHeadBmpNo := 1, ::nHeadBmpNo := 2 ), ::oBrw:Refresh() }
oCol:cHeader := "CLIP"
oCol:nHeadBmpNo := 1
oCol:nHeadBmpAlign := AL_RIGHT
oCol := oBrw:AddCol()
oCol:bStrData := { || _FIELD->First}
oCol:cHeader := "First"
oCol:oDataFont := oFont
oCol := oBrw:AddCol()
oCol:bStrData := { || _FIELD->Last}
oCol:cHeader := "Last"
oCol := oBrw:AddCol()
oCol:AddResource("GREEN")
oCol:AddResource("RED")
oCol:cHeader := "Married"
oCol:bBmpData := { || iif( _FIELD->Married, 1, 2) }
oCol:bStrData := { || iif( _FIELD->Married, "Yes", "No ")}
oCol:bEditValue := { || _FIELD->Married }
oCol:nDataStyle := oCol:DefStyle( AL_RIGHT, .T.)
oCol:nEditType := EDIT_LISTBOX
oCol:aEditListTxt := { "Yes", "No"}
oCol:aEditListBound := { .t., .f. }
oCol:bOnPostEdit := {|o, v| _FIELD->Married := v }
oBrw:SetRDD()
oBrw:CreateFromCode()
oChild:oClient := oBrw
ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()
oFont:End()
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 78 guests