Deselect

The Deselect event handler enables you to take action when the user deselects the XMLNode. The Deselect event differs from the ContextLeave event in that Deselect is raised only for the XMLNode that is deselected, and not for the parent XMLNode. Listing 6.32 hides the XMLNodes in the document when the XMLNode is deselected.

Listing 6.32. Hiding the XMLNode markup in the document when text in an XMLNode control is deselected

Private Sub NameFirstNameNode_Deselect(ByVal sender As _ Object, ByVal e As Microsoft.Office.Tools.Word _

.ContextChangeEventArgs) Handles _ NameFirstNameNode.Deselect

Me.ActiveWindow.View.ShowXMLMarkup = False End Sub

0 0

Post a comment