gpt4 book ai didi

Delphi TStringGrid 闪烁

转载 作者:行者123 更新时间:2023-12-03 14:41:10 31 4
gpt4 key购买 nike

我正在运行时从 CSV 文件向字符串网格添加多行,但是 StringGrid 在更新时似乎会闪烁很多,我认为会有一个 beginupadate/Endupdate 命令来停止此操作。但是我找不到它。有没有其他方法可以在更新网格 ID 时停止闪烁。

科林

最佳答案

迟到总比不到好……我用WM_SETREDRAW 。例如:

...
StringGrid1.Perform(WM_SETREDRAW, 0, 0);
try
// StringGrid1 is populated with the data here
finally
StringGrid1.Perform(WM_SETREDRAW, 1, 0);
StringGrid1.Invalidate; // important! to force repaint after all
end;
...

关于Delphi TStringGrid 闪烁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3712229/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com