property Edit.Context ([Context as Variant]) as EditContext
Gets the context's collection.

TypeDescription
Context as Variant A string expression that defines the key of the context window to be defined / shown. Leave it empty, if single context is defined. 
EditContext A Context object that indicates the collection of keywords in the control's context list.

Use the Context collection to customize the list of keywords when the code completion is enabled. The control can display multiple pages on the control's sensitive context, if multiple key-context are defined. The ActiveContextItems property defines the key of the current context. Use the CodeCompletion property to disable the code completion support. By default, the user can display the control's context window by pressing the CTRL + SPACE key combination. Use the ContextKey property to define the key combination to open the control's context window. The ShowContext method shows programmatically the control's context, as the user would press the CTRL + SPACE key. The PagesContextItems property specifies the pages (key[:caption]) of the control's sensitive context, separated by comma character. 

The control's context window is not the control's context menu. The control's context window is shown when user presses the ContextKey combination, instead the control's context menu is displayed when user does a right click.  Use the AllowContextMenu property to display the control's context menu when user right clicks the control.

How can I add a sensitive context window?

VBA (MS Access, Excell...)

With Edit1
	.AddKeyword "<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit"
	.Refresh 
	.Context().Add "class"
End With

VB6

With Edit1
	.AddKeyword "<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit"
	.Refresh 
	.Context().Add "class"
End With

VB.NET

With Exedit1
	.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit")
	.Refresh()
	.get_Context().Add("class")
End With

VB.NET for /COM

With AxEdit1
	.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit")
	.Refresh()
	.get_Context().Add("class")
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXEDITLib' for the library: 'ExEdit 1.0 Control Library'

	#import <ExEdit.dll>
	using namespace EXEDITLib;
*/
EXEDITLib::IEditPtr spEdit1 = GetDlgItem(IDC_EDIT1)->GetControlUnknown();
spEdit1->AddKeyword(L"<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit",vtMissing);
spEdit1->Refresh();
spEdit1->GetContext(vtMissing)->Add(L"class",vtMissing,vtMissing,vtMissing);

C++ Builder

Edit1->AddKeyword(L"<b>class</b>",TVariant("this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword."),TVariant("exontrol.edit"),TNoParam());
Edit1->Refresh();
Edit1->Context[TNoParam()]->Add(L"class",TNoParam(),TNoParam(),TNoParam());

C#

exedit1.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit",null);
exedit1.Refresh();
exedit1.get_Context(null).Add("class",null,null,null);

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:39136531-DD0F-4281-B445-E36FC2CDDBC5" id="Edit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	Edit1.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit",null);
	Edit1.Refresh();
	Edit1.Context(null).Add("class",null,null,null);
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:39136531-DD0F-4281-B445-E36FC2CDDBC5" id="Edit1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Edit1
		.AddKeyword "<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit"
		.Refresh 
		.Context().Add "class"
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axEdit1.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit",null);
axEdit1.Refresh();
axEdit1.get_Context(null).Add("class",null,null,null);

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Context;
	anytype var_Context;
	;

	super();

	exedit1.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit");
	exedit1.Refresh();
	var_Context = COM::createFromObject(exedit1.Context()); com_Context = var_Context;
	com_Context.Add("class");
}

Delphi 8 (.NET only)

with AxEdit1 do
begin
	AddKeyword('<b>class</b>','this is a bit of text that''s shown when the cursor hovers the <b>class</b> keyword.','exontrol.edit',Nil);
	Refresh();
	get_Context(Nil).Add('class',Nil,Nil,Nil);
end

Delphi (standard)

with Edit1 do
begin
	AddKeyword('<b>class</b>','this is a bit of text that''s shown when the cursor hovers the <b>class</b> keyword.','exontrol.edit',Null);
	Refresh();
	Context[Null].Add('class',Null,Null,Null);
end

VFP

with thisform.Edit1
	.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit")
	.Refresh
	.Context().Add("class")
endwith

dBASE Plus

local oEdit

oEdit = form.EXEDITACTIVEXCONTROL1.nativeObject
oEdit.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit")
oEdit.Refresh()
oEdit.Context().Add("class")

XBasic (Alpha Five)

Dim oEdit as P

oEdit = topparent:CONTROL_ACTIVEX1.activex
oEdit.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit")
oEdit.Refresh()
oEdit.Context().Add("class")

Visual Objects


oDCOCX_Exontrol1:AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit",nil)
oDCOCX_Exontrol1:Refresh()
oDCOCX_Exontrol1:[Context,nil]:Add("class",nil,nil,nil)

PowerBuilder

OleObject oEdit

oEdit = ole_1.Object
oEdit.AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit")
oEdit.Refresh()
oEdit.Context().Add("class")

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Send ComAddKeyword "<b>class</b>" "this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword." "exontrol.edit" Nothing
	Send ComRefresh
	Variant voContext
	Get ComContext Nothing to voContext
	Handle hoContext
	Get Create (RefClass(cComContext)) to hoContext
	Set pvComObject of hoContext to voContext
		Send ComAdd of hoContext "class" Nothing Nothing Nothing
	Send Destroy to hoContext
End_Procedure

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oEdit

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oEdit := XbpActiveXControl():new( oForm:drawingArea )
	oEdit:CLSID  := "Exontrol.Edit.1" /*{39136531-DD0F-4281-B445-E36FC2CDDBC5}*/
	oEdit:create(,, {10,60},{610,370} )

		oEdit:AddKeyword("<b>class</b>","this is a bit of text that's shown when the cursor hovers the <b>class</b> keyword.","exontrol.edit")
		oEdit:Refresh()
		oEdit:Context():Add("class")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN