中国程序员联盟 正在重新改版中ing 不便之处还请见谅 改版后将内容涉及java delphi .net php
 
  首页 | 数据库开发 | 网络通讯 | 多线程 | 多媒体开发 | 图像处理 | 程序人生 | 系统函数 | 控件开发 | Web服务
 
  当前位置:笨鱼delphi技术网>控件开发>控件使用>文章内容

delphi 显示GRID单Cell框的Hint

来源:国外 关于:Tomas Rutkauskas 发布时间:2007-07-19   [收藏] [推荐]
Here's an example taken from a working app but simplified a little. OldHintRow and OldHintCol are private variables declared in TStosWin. They store the column and row for which the hint was shown previously.
procedure TStosWin.MyDrawGrid1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
  R, C: Integer;
begin
  with MyDrawGrid1 do
  begin
    MouseToCell(X, Y, C, R);
    if (C = OldHintCol) and (R = OldHintRow) then
      exit; {Don't do anything if mouse is in the same cell}
    OldHintCol := C;
    OldHintRow := R;
    Hint := ' Your hint for column C and row R';
    {Force the hint to redisplay}
    PostMessage(Handle, WM_MBUTTONDOWN, MK_LBUTTON, Dword((Y shl 16) + X));
  end;
end;

[浏览: 次]   
上一篇:delphi 在GRID画一个没有滚动条的背景图   下一篇:delphi VCL控件机制与VCL.net控件机制
[收藏] [推荐] [返回顶部] [打印本页] [关闭窗口]  
    评论加载中…
google adsense热点文章
·delphi treeview 使用
·delphi delphi下对象类别检查
·delphi 组件序列化
·delphi 如何在DBGRID里添加行序号
·delphi 组件用户自定义设计期工具
·delphi 如何保存属性到运行期使用(上)
·delphi 组件序列化
·delphi 如何将系统所有菜单列到树上Tre
·delphi 如何将属性在设计期保存到DFM文
·delphi 如何保存属性到运行期使用(下)
·delphi VCL控件机制与VCL.net控件机制
·delphi 在GRID画一个没有滚动条的背景
     delphi技术网 | firefox 下载 | Avant Browser下载 | dedecms 技术网 | drupal 爱好者 | php 技术网
  Copyright@www.delphichm.com,2006-2009.All Rights Reserved.
 
程序员联盟 | delphi Java .net|QQ:707102932