From Xojo Documentation


WebMenuItem.Clone() As WebMenuItem

New in 2011r2

Supported for all project types and targets.

Duplicates the menu and all of its children so that it can be used elsewhere.


This example uses Clone to duplicate a contextual from one Label (Label1) for use by a different label:

If Label1.ContextualMenu <> Nil Then
Var base As WebMenuItem
base = Label1.ContextualMenu.Clone
Me.ContextualMenu = base
End If