中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 数据库开发 > 数据库综合
pb用纯函数实现在数据窗口中模拟资源管理器鼠标单击动作动态排序,并显示排序箭头
作者:未知 时间:2001-08-06 12:12 出处:Blog 责编:chinaitpower
              摘要:暂无
//函数名:f_dwsort(datawindow fdw_dw,dwobject fdwo_dwo) return none
//说明:用于在数据窗口中模拟资源管理器鼠标单击动作动态排序,并显示排序箭头
//调用规则:在数据窗口控件clicked!中写入f_dwsort(this,dwo)
//参数:fdw_dw datawindow
//    fdwo_dwo dwobject
//返回值:无
//autor:xiaoluoxy萧云

String ls_clicked_pos,ls_col,ls_format,ls_tag
Long ll_pos
string ls_text,ls_column[]
int li_i

ls_clicked_pos = fdwo_dwo.Name
ll_pos = Pos(ls_clicked_pos,'_t')

If ll_pos >0 Then
//设置排序
ls_col = Left(ls_clicked_pos,ll_pos -1)
ls_tag = fdwo_dwo.tag
If ls_tag = ls_col + "A"  Then
fdwo_dwo.tag = ls_col + "D"
ls_format = ls_col+" A"
ELSEIF ls_tag = ls_col + "D"  Then
fdwo_dwo.tag = ls_col + "A"
ls_format = ls_col+" D"
Else
fdwo_dwo.tag = ls_col + "D"
ls_format = ls_col+" A"
End If

//设置列标题
for li_i = 1 to long(fdw_dw.object.datawindow.column.count)
ls_column[li_i] = fdw_dw.describe("#" + string(li_i) + ".Name") //得到列名
ls_text =  fdw_dw.Describe(ls_column[li_i] + "_t.text")
if right(ls_text,2)="▽" or right(ls_text,2)="△" then
ls_text = left(ls_text,len(ls_text) - 2)
end if
fdw_dw.modify(ls_column[li_i] + "_t.text='"+ls_text + "'")
next

ls_text = fdw_dw.Describe(ls_clicked_pos + ".text")
if right(ls_text,2)="▽" or right(ls_text,2)="△" then
ls_text = left(ls_text,len(ls_text) - 2)
end if
if right(ls_format,1) = 'A' then
fdw_dw.modify(ls_clicked_pos + ".text='"+ls_text + "△'")
elseif right(ls_format,1) = 'D' then
fdw_dw.modify(ls_clicked_pos + ".text='"+ls_text + "▽'")
end if
fdw_dw.SetSort(ls_format)
fdw_dw.Sort()
End If

//本程序在pb6.5下通过测试
关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有