滚动条如何自动滚动

叔到用时方恨嫂 2011-06-13 02:12:03
数据窗口对象中:
选中某一行的某一列,鼠标左键不放拖动,光标到达窗口底部时如何让垂直滚动条自动滚动,不准用滚轮(汗:用一下滚轮要死呀,(使用系统的人要求这样));
要求:不用鼠标中的滚轮控制滚动条滚动,用代码控制
...全文
114 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lvlvjy 2011-06-15
  • 打赏
  • 举报
回复
顶~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
yyoinge 2011-06-15
  • 打赏
  • 举报
回复
见怪不怪,用户肯定是用惯了Excel了
canyon1982 2011-06-15
  • 打赏
  • 举报
回复
第一次见过这种奇怪的需求
newease 2011-06-15
  • 打赏
  • 举报
回复
客户的需求总是千变万化的
fuxiaoyang13 2011-06-14
  • 打赏
  • 举报
回复
还有这样要求的!太少见了!!!!
yyoinge 2011-06-13
  • 打赏
  • 举报
回复
将以下内容保存为“.sru”格式的文件,再导入,然后通过它来建立数据窗口
$PBExportHeader$uo_datawindow.sru
forward
global type uo_datawindow from datawindow
end type
end forward

global type uo_datawindow from datawindow
integer width = 686
integer height = 400
string title = "none"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
event ue_dwmousemove pbm_dwnmousemove
event ue_lbuttonup pbm_dwnlbuttonup
event ue_lbuttondown pbm_lbuttondown
event ue_mousemove pbm_dwnmousemove
end type
global uo_datawindow uo_datawindow

type prototypes
function ulong SetCapture(ulong hwnd) library "user32.dll"
function boolean ReleaseCapture() library "user32.dll"

end prototypes

event ue_lbuttonup;ReleaseCapture()
end event

event ue_lbuttondown;SetCapture(handle(this))
end event

event ue_mousemove;if keydown(keyleftbutton!) then
if ypos >= unitstopixels(this.height, yunitstopixels!) then
this.scrolltorow(long(this.Object.DataWindow.LastRowOnPage) + 1)
elseif ypos <= 0 then
this.scrolltorow(long(this.Object.DataWindow.FirstRowOnPage) - 1)
end if
end if

end event

on uo_datawindow.create
end on

on uo_datawindow.destroy
end on

609

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧