让双击不能编辑,只有通过操作进入编辑??

QIU2008 2003-10-09 03:52:08
如题!!
...全文
64 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
wjzmy 2003-10-11
  • 打赏
  • 举报
回复
按钮?
你可以把它设成共享的lotusscript的代码啊~
QIU2008 2003-10-11
  • 打赏
  • 举报
回复
这个编辑按扭可以是共享操作吗?我设成共享操作时的参数无法传递,如何设定数据库的全局变量呢?
firesyang 2003-10-10
  • 打赏
  • 举报
回复
哦,忘了
guyue216 2003-10-10
  • 打赏
  • 举报
回复
同意楼上的,不过在表单定义全局变量:Dim allowEdit As Integer
firesyang 2003-10-10
  • 打赏
  • 举报
回复
在表单的事件中写
Sub Postopen(Source As Notesuidocument)
If source.EditMode And Not source.IsNewDoc Then
allowEdit = True
source.EditMode = False
Else
allowEdit = False
End If
End Sub
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
If allowEdit Or (source.EditMode And Not allowEdit) Then
allowEdit = False
Else
continue = False
End If
End Sub
增加一个编辑按钮
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
allowEdit = True
uidoc.EditMode = True
End Sub
xlh0902 2003-10-09
  • 打赏
  • 举报
回复
方法一:利用NotesUIDocument的QueryModeChange事件(此事件在切换文档的读和编辑模式之前被触发)中的Continue参数。
方法二:通过访问NotesUiDocument的EditMode属性来判断用户是否在将文档由读模式切换为编辑模式。例:
'(Globals) object, (Declarations) event
Dim allowEdit As Integer
'(Form) object, Postopen event
Sub Postopen(Source As Notesuidocument)
'Let document pass if new or not in EditMode
'Otherwise if existing document is in EditMode
' Set allowEdit so Querymodechange doesn't reprocess
' Turn EditMode off so document opens in Read mode
' Tell the user to use the action
If source.EditMode And Not source.IsNewDoc Then
allowEdit = True
source.EditMode = False
Messagebox _
"Use Edit mode action to edit document"
Else
allowEdit = False
End If
End Sub
'(Form) object, Querymodechange event
Sub Querymodechange(Source As Notesuidocument, Continue As Integer)
'Allow user to proceed, and turn off allowEdit if
' user clicked the action (allowEdit on)
' already processed by Postopen (allowEdit on)
' trying to get out of Edit mode
' (allowEdit off but EditMode on)
'Tell user to click action if changing existing document
' to Edit mode and not already processed by Postopen
' (allowEdit and EditMode off)
If allowEdit Or (source.EditMode And Not allowEdit) Then
allowEdit = False
Else
Messagebox _
"Use Edit mode action to edit document"
continue = False
End If
End Sub
'(Action) object, Click event
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
'Turn on allowEdit so Querymodechange will let it pass
'Turn on EditMode
allowEdit = True
uidoc.EditMode = True
End Sub

535

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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