鼠标移动时让数据窗口中当前鼠标下的数据行改变颜色

来源:互联网 发布:关于旅游数据统计网站 编辑:程序博客网 时间:2024/04/30 19:36

编程步骤如下:
1、定义窗口实例变量:
String is_OldColor
2、在数据窗口的Constructor事件中编写如下脚本:
is_OldColor = This.Describe("datawindow.detail.color")
3、为数据窗口定义一个自定义事件,事件名称叫什么并不重要,关键要映射pbm_MouseMove事件。然后在该自定义事件上编写如下脚本:
string ls_dwoname
string ls_temp

ls_dwoname=GetObjectAtPointer()
This.Modify("row_t.text='0'")
ls_temp = Mid(ls_dwoname,Pos(ls_dwoname,'~t') + 1)
if integer(ls_temp) > 0 then&
This.Modify("row_t.text='" + ls_temp + "'")

This.Modify("datawindow.detail.color='0~tif(getrow()=" + ls_temp + ",rgb(25,200,240)," + is_OldColor + ")'")

 
原创粉丝点击