Sound color

xiaoxiao2021-03-06  21

Procedure TFRMSellopenOrder.dbgriddrawColumnCell (Sender: Tobject)

CONST RECT: TRECT; DATACOL: Integer; Column: tcolumn;

State: TGRIDDRAWSTATE);

Begin

DBGRID.cANVAS.PEN.MODE: = PMMASK;

With dbgrid do

Begin

IF (state = [gdselected]) or (state = [gdselected)).

Begin

Canvas.Font.color: = ClyEllow;

Canvas.brush.color: = clnavy;

end

Else

Begin

If DataModulerp.adoqsaleDetail.Recno Mod 2 <> 0 THEN {Judging the current data is odd or even number of lines}

Canvas.brush.color: = CLRED {If it is an odd line, DBGRID background is displayed in white}

Else

Canvas.brush.color: = $ 00Eaea; {If it is an even line, the dbgrid background is shown in light gray color}

END;

DBGRID.DEFAULTDRAWCOLUMNCELL (Rect, Datacol, Column, State);

END;

END;

转载请注明原文地址:https://www.9cbs.com/read-40944.html

New Post(0)