数据窗口中数据有效性检验问题(等待中!)

laohaifly2003 2003-09-23 02:38:46
在数据窗口中我想实现的是:
如果用户输入的内容为错误格式,
那么不是由系统提示程序程序错误,
而是弹出窗口,
告诉用户输入什么格式的内容。
请问如何实现。
...全文
23 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
xzg8848 2003-09-24
  • 打赏
  • 举报
回复
如果你在itemchanged事件中判断是否符合要求,请注意:
在itemchanged事件的返回值定义如下:
0 (Default) Accept the data value
1 Reject the data value and don't allow focus to change
2 Reject the data value but allow the focus to change
当不符合时,若return 1 ,则焦点不允许离开,return 2则焦点允许离开;同时会触发itemerror事件,itemerror事件的返回值宥 如下定义:
0 (Default) Reject the data value and show an error message box
1 Reject the data value with no message box
2 Accept the data value
3 Reject the data value but allow focus to change
如果你想拒绝不符合条件的值又不想出现系统提示,在itemerror中return 1

csdsjkk 2003-09-23
  • 打赏
  • 举报
回复
itemerror:
return 1
wantsong 2003-09-23
  • 打赏
  • 举报
回复
itemerror事件
workhand 2003-09-23
  • 打赏
  • 举报
回复
在itemchanged里判断是否符合要求,不符合提示 return就ok了
swallow0175 2003-09-23
  • 打赏
  • 举报
回复
你可以屏蔽调dw的系统错误提示,然后在自己写就可以了
eminena 2003-09-23
  • 打赏
  • 举报
回复
什么样的格式才叫'错误'格式?
xingxing 2003-09-23
  • 打赏
  • 举报
回复
你可以在用户输入后用程序判断(处理在editchanged中)

在dw的设计状态下选择验证,在提示文本中输入你要提示的文本,然后设计输入格式,

609

社区成员

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

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