tstringgrid

Delphi TStringGrid Flicker

99封情书 提交于 2019-11-27 02:49:11
问题 I am adding multiple rows to a string grid from a CSV file @ runtime, However the StringGrid seems to flicker lots when it is being upadated, I presumed there would be a beginupadate / Endupdate command to stop this. However I cannot find it. Is there another way to stop the flicker when the grid id being updated. Colin 回答1: Better late than never... I use WM_SETREDRAW. For example: ... StringGrid1.Perform(WM_SETREDRAW, 0, 0); try // StringGrid1 is populated with the data here finally

delphi : how can I change color of a cell in string grid

。_饼干妹妹 提交于 2019-11-26 22:01:27
问题 I want to change background color ( not font ) of a cell in string grid in delphi . Just one cell not a row or a column. Can I? RRUZ : your procedure is correct and works but in my procedure doesn't work. My procedure: x is a global array of integer procedure TF_avalie_salon.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); var S: string; begin S := StringGrid1.Cells[ACol, ARow]; StringGrid1.Canvas.FillRect(Rect); SetTextAlign(StringGrid1.Canvas