Adds a context menu to the specified control.
Syntax: AddContextMenu (ControlName As Control, ContextMenu As ContextMenu)
Example:
'Add a FormLib object named FormLib1 and a ContextMenu object named
Context1.
Sub Globals
End Sub
Sub App_Start
Form1.Show
FormLib1.New1("Form1",b4pobject(1))
Context1.New1
Context1.AddItem("Yes")
Context1.AddItem("No")
Context1.AddItem("-") 'Adds a separator
Context1.AddItem("Maybe")
FormLib1.AddContextMenu("TextBox1",Context1.Value)
End Sub
Sub Context1_Click
Select Context1.SelectedText
Case
"Yes"
'Do something
Case
"No"
'Do something
Case
"Maybe"
'Do something
End Select
End Sub