PowerBuilder 单击、双击DW列名标题排序

1、创建实例变量(全局变量也可以)

string is_sort='a' //用来标识排序

2、事件选择
双击事件:doubleclicked
单击事件:clicked

string ls_type,ls_name,ls_Band,ls_title

ls_type = dwo.Type

if ls_type = 'text' then
	ls_Band = dwo.Band
	if ls_Band <> 'header' then return
	ls_title = dwo.name
	ls_name = left(ls_title,(len(ls_title) - 2)) //截取;_t
	if this.describe(ls_name + ".band") <> '!' then //判断列名是否正确
		if is_sort = 'a' then
			this.SetSort(ls_name + " A")
			is_sort = 'd'
		else
			this.SetSort(ls_name + " D")
			is_sort = 'a'
		end if
		this.sort()
	end if
end if
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值