The DBGRID control is a control for displaying a database of many user interfaces. The following programs tell you how to change the display color of the font based on the content displayed. For example, if the population of a city is greater than 2 million, we let it show blue. Used to control events DBGrid.OnDrawColumeCell.procedure TForm1.DBGrid1DrawColumnCell (Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); beginif Table1.FieldByName ( 'Population') AsInteger> 20000000 thenDBGrid1. .Canvas.font.color: = CLBLUE; DBGRID1.DEFAULTDRAWCOLUMNCELL (Rect, Datacol, Column, State); END; The above example is simple, but you can expand according to your needs, such as fonts, etc., or even you can Call the drawing function to draw a red circle on the number.