method Edit.DeleteKeyword (Keyword as String)
Deletes a keyword from keywords collection.

TypeDescription
Keyword as String A string expression that defines the keyword being deleted. The Keyword parameter must not include HTML tags.

Use the DeleteKeyword method to delete a particular keyword from the keywords collection. The DeleteKeyword method has effect only if the control's EditType property is exSensitive. Use the ClearKeywords method to clear all keywords.  Use the Refresh method  to let control reflects changes in the visible area.

The following VB sample adds a keyword and removes it when then user presses a button:

Private Sub Form_Load()
    With Edit1
        .AddKeyword "<b>public</b>", "The public keyword's tooltip."
        .Refresh
    End With
End Sub
Private Sub Command1_Click()
    With Edit1
        .DeleteKeyword "public"
        .Refresh
    End With
End Sub

Important to note is that the "public" keyword doesn't include the HTML tags, when DeleteKeyword method is called.

The following C++ sample adds a keyword when the form is loaded, and removes it when the user presses a button:

COleVariant vtMissing; vtMissing.vt = VT_ERROR;
m_edit.AddKeyword("<b>public</b>", COleVariant( "The public keyword's tooltip." ), vtMissing, vtMissing);
m_edit.Refresh();
void OnButton1() 
{
	m_edit.DeleteKeyword( "public" );
	m_edit.Refresh();
}

The following VB.NET sample adds a keyword when the form is loaded, and removes it when the user presses a button:

With AxEdit1
    .AddKeyword("<b>public</b>", "The public keyword's tooltip.", Nothing, Nothing)
    .CtlRefresh()
End With
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
	With AxEdit1
		.DeleteKeyword("public")
		.CtlRefresh()
	End With
End Sub

The following C# sample adds a keyword when the form is loaded, and removes it when the user presses a button:

axEdit1.AddKeyword("<b>public</b>", "The public keyword's tooltip.", null, null);
axEdit1.CtlRefresh();
private void button1_Click(object sender, EventArgs e)
{
	axEdit1.DeleteKeyword("public");
	axEdit1.CtlRefresh();
}

The following VFP sample adds a keyword when the form is loaded, and removes it when the user presses a button:

With thisform.Edit1.Object
	.AddKeyword("<b>public</b>", "The public keyword's tooltip.")
	.Refresh()
EndWith
with thisform.Edit1.Object
	.DeleteKeyword("public")
	.Refresh()
endwith