本文整理自网络,侵删。
delphi ??B以 ListBox 的Item ?? Hint
procedure TForm1.ListBox1MouseMove
(Sender: TObject; Shift: TShiftState; X, Y: Integer) ;
var lstIndex : Integer ;
begin
with ListBox1 do begin
lstIndex:=SendMessage(Handle,
LB_ITEMFROMPOINT,
0, MakeLParam(x,y)) ;
if (lstIndex >= 0) and
(lstIndex <= Items.Count) Then
Hint := Items[lstIndex]
else
Hint := ''
end;
end;
end.
相关阅读 >>
Delphi 递归实现从m 个集合中 任取一个元素 生成组合
decodedatetime:将一个tdatetime变量拆分成它的日期/时间 部分
Delphi webbrowser通过遍历id查找元素是否存在
更多相关阅读请进入《Delphi》频道 >>