我希望鼠标点击StringGrid的时候,不要出现焦点,即不要有蓝色或者虚线框
解决方案 »
- delphi 7提供一些基于TCP/IP编程的网络组件问题?
- 关于引用的问题
- Rbuilder大师请进,报表相关问题,up者不欢迎,100分,不够再给
- 如何让Windows2000支持更多的游戏呢
- 两个txt文件,怎么按行比较差异?????
- #####如何捕获在窗体外,鼠标右键或左键CLICK时的鼠标的坐标点#####
- 简单的动态的RADIOGROUP使用问题我现在希望通过点击动态的RADIOGROUP的ITEMS(就是DEPT的值),来对表KQ过滤(SELECT * from kq where de
- 开发Windows 2000服务遇到的怪问题
- 请问如何将日期由‘2001-3-30’转换成‘20010330’的形式?
- 急!BDE打开DBF数据表错误!
- 请问如下代码的语法是啥意思,请指教
- 如何改变statusbar中的字体颜色
options里goAlwaysShowEditor:=true;
在StringGrid的OnDrawCell事件中添加以下代码即可实现楼主想要的效果,不过感觉怪怪的。没有焦点的样子好不习惯。 -_-|||// 63 63 72 75 6E 2E 63 6F 6D
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if gdSelected In State then
begin
StringGrid1.Canvas.Brush.Color := StringGrid1.Color;
StringGrid1.Canvas.FillRect(Rect);
StringGrid1.Canvas.Font.Color := clBlack;
StringGrid1.Canvas.TextRect(Rect, Rect.Left + 2,
Rect.Top + 2, StringGrid1.Cells[ACol, ARow]);
end;
if gdFocused In State then
StringGrid1.Canvas.DrawFocusRect(Rect);
end;