以文本方式查看主题 - 蓝色快车PB俱乐部论坛 (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspindex.asp) -- PowerBuilder MIS编程 (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspbbs.asp?boardid=1) ---- [原创]如何出发下拉式数据窗口(子窗口)中的按钮事件? (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspdispbbs.asp?boardid=1&rootid=60&id=390) |
-- 作者:bkm -- 发布时间:2003/4/15 10:30:31 -- [原创]如何出发下拉式数据窗口(子窗口)中的按钮事件? 如何出发下拉式数据窗口(子窗口)中的按钮事件 |
-- 作者:bluetlck -- 发布时间:2003/6/30 8:42:07 -- 假设dddw列列名为,the_test,如下: 1、自定义事件ue_pbmcommand,选择event_id为pbm_command,定义一instance变量 string is_object 2、编写脚本DataWindowChild ldwc_Child GetChild( "the_test", ldwc_Child ) IF hwndchild = Handle( ldwc_Child ) THEN CHOOSE CASE notificationcode CASE 2048 // RowFocusChanged on DDDW CASE 1281 // Clicked IF is_object = 按钮名称 THEN //按钮单击处理 END IF CASE 2314 // Right Mouse Button Clicked CASE 2311 // MouseMove is_object = ldwc_Child.GetObjectAtPointer() END CHOOSE END IF 3、原理: 在PB6.0(^)中,pbm_command带3个参数,其中hwndchild(long)与notificationcode(unsignedinteger)即DDDW的Handle和Event ID。 ⒉DDDW 的Event ID 列表: 倘为鼠标点击滚动条上下按钮: |
"> |