Disable Right click Edit option in Preview Pane - how?

We have an application that makes good use of the PreviewPane. We also have a requirement that users not be able to edit documents while they are opened in the PreviewPane.

Look at your Mailfile and you will see that Edit (Ctrl-E) is greyed out when the mouse cursor is in the Preview Pane and you right click there. If you then right click anywhere on the view above, Edit (and Ctrl-E) are now available.

How do we duplicate this functionality in other databases? I have not found anything in the Mail template that controls this behavior.

Does anyone have any idea how they accomplished this and how we recreate it?

Subject: Disable Right click Edit option in Preview Pane - how?

Sub Querymodechange(Source As Notesuidocument, Continue As Variant) If source.InPreviewPane Then

	Msgbox "Editing from the preview pane is not allowed"

	continue = False

End If

End Sub

Subject: RE: Disable Right click Edit option in Preview Pane - how?

Thought about that before I posted the question. Problem is that the EDIT option is still available regardless of what you put in QMC.

I need to do exactly what they are doing in the Mailfile and that is NOT using the QMC.

Anyone else?

Subject: Querymodechange

I didn’t analyze the mail database but there’s a property of NotesUIDocument called InPreviewPane. If its value is True then the document is accessed from the preview pane. You could check this property in the form’s Querymodechange event and prevent a switch to Edit mode if the document is open in the preview pane in read mode.