event UncheckItem (Itm as Item)
Occurs when the user unchecks the item.

TypeDescription
Itm as Item An Item object that indicates the item being un-checked.
The trial/evaluation version of the control limits firing this event. In other words, using the trial/evaluation version won't fire the event every time.

The UncheckItem event notifies your application once the user clicks the item's check-box. The Check property indicates whether the Item has associated a check box. The Checked property specifies whether the item is checked or unchecked. Use the Radio property to display a radio-button on the item. In C++ or VFP, you can use the Notifier to get notified through the WM_COMMAND message. The Checked property specifies whether the item is checked or unchecked. The CheckedItem event notifies once the user checks the item.

Syntax for UncheckItem event, /NET version, on:

private void UncheckItem(object sender,exontrol.EXTOOLBARLib.Item Itm)
{
}

Private Sub UncheckItem(ByVal sender As System.Object,ByVal Itm As exontrol.EXTOOLBARLib.Item) Handles UncheckItem
End Sub

Syntax for UncheckItem event, /COM version, on:

private void UncheckItem(object sender, AxEXTOOLBARLib._IToolBarEvents_UncheckItemEvent e)
{
}

void OnUncheckItem(LPDISPATCH Itm)
{
}

void __fastcall UncheckItem(TObject *Sender,Extoolbarlib_tlb::IItem *Itm)
{
}

procedure UncheckItem(ASender: TObject; Itm : IItem);
begin
end;

procedure UncheckItem(sender: System.Object; e: AxEXTOOLBARLib._IToolBarEvents_UncheckItemEvent);
begin
end;

begin event UncheckItem(oleobject Itm)
end event UncheckItem

Private Sub UncheckItem(ByVal sender As System.Object, ByVal e As AxEXTOOLBARLib._IToolBarEvents_UncheckItemEvent) Handles UncheckItem
End Sub

Private Sub UncheckItem(ByVal Itm As EXTOOLBARLibCtl.IItem)
End Sub

Private Sub UncheckItem(ByVal Itm As Object)
End Sub

LPARAMETERS Itm

PROCEDURE OnUncheckItem(oToolBar,Itm)
RETURN

Syntax for UncheckItem event, /COM version (others), on:

<SCRIPT EVENT="UncheckItem(Itm)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function UncheckItem(Itm)
End Function
</SCRIPT>

Procedure OnComUncheckItem Variant llItm
	Forward Send OnComUncheckItem llItm
End_Procedure

METHOD OCX_UncheckItem(Itm) CLASS MainDialog
RETURN NIL

void onEvent_UncheckItem(COM _Itm)
{
}

function UncheckItem as v (Itm as OLE::Exontrol.ToolBar.1::IItem)
end function

function nativeObject_UncheckItem(Itm)
return

The following samples show how you can get notified once the user un-checks an item:

VBA (MS Access, Excell...)

' UncheckItem event - Occurs when the user unchecks the item.
Private Sub ToolBar1_UncheckItem(ByVal Itm As Object)
	With ToolBar1
		Debug.Print( "UncheckItem event on Itm object" )
	End With
End Sub

With ToolBar1
	With .Items
		.Add("Item").Check = True
		.Add("Item").Check = True
	End With
	.Refresh 
End With

VB6

' UncheckItem event - Occurs when the user unchecks the item.
Private Sub ToolBar1_UncheckItem(ByVal Itm As EXTOOLBARLibCtl.IItem)
	With ToolBar1
		Debug.Print( "UncheckItem event on Itm object" )
	End With
End Sub

With ToolBar1
	With .Items
		.Add("Item").Check = True
		.Add("Item").Check = True
	End With
	.Refresh 
End With

VB.NET

' UncheckItem event - Occurs when the user unchecks the item.
Private Sub Extoolbar1_UncheckItem(ByVal sender As System.Object,ByVal Itm As exontrol.EXTOOLBARLib.Item) Handles Extoolbar1.UncheckItem
	With Extoolbar1
		Debug.Print( "UncheckItem event on Itm object" )
	End With
End Sub

With Extoolbar1
	With .Items
		.Add("Item").Check = True
		.Add("Item").Check = True
	End With
	.Refresh()
End With

VB.NET for /COM

' UncheckItem event - Occurs when the user unchecks the item.
Private Sub AxToolBar1_UncheckItem(ByVal sender As System.Object, ByVal e As AxEXTOOLBARLib._IToolBarEvents_UncheckItemEvent) Handles AxToolBar1.UncheckItem
	With AxToolBar1
		Debug.Print( "UncheckItem event on Itm object" )
	End With
End Sub

With AxToolBar1
	With .Items
		.Add("Item").Check = True
		.Add("Item").Check = True
	End With
	.Refresh()
End With

C++

// UncheckItem event - Occurs when the user unchecks the item.
void OnUncheckItemToolBar1(LPDISPATCH Itm)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXTOOLBARLib' for the library: 'ExToolBar 1.0 Control Library'
		#import <ExToolBar.dll>
		using namespace EXTOOLBARLib;
	*/
	EXTOOLBARLib::IToolBarPtr spToolBar1 = GetDlgItem(IDC_TOOLBAR1)->GetControlUnknown();
	OutputDebugStringW( L"UncheckItem event on Itm object" );
}

EXTOOLBARLib::IToolBarPtr spToolBar1 = GetDlgItem(IDC_TOOLBAR1)->GetControlUnknown();
EXTOOLBARLib::IItemsPtr var_Items = spToolBar1->GetItems();
	var_Items->Add(L"Item",vtMissing,vtMissing)->PutCheck(VARIANT_TRUE);
	var_Items->Add(L"Item",vtMissing,vtMissing)->PutCheck(VARIANT_TRUE);
spToolBar1->Refresh();

C++ Builder

// UncheckItem event - Occurs when the user unchecks the item.
void __fastcall TForm1::ToolBar1UncheckItem(TObject *Sender,Extoolbarlib_tlb::IItem *Itm)
{
	OutputDebugString( L"UncheckItem event on Itm object" );
}

Extoolbarlib_tlb::IItemsPtr var_Items = ToolBar1->Items;
	var_Items->Add(L"Item",TNoParam(),TNoParam())->Check = true;
	var_Items->Add(L"Item",TNoParam(),TNoParam())->Check = true;
ToolBar1->Refresh();

C#

// UncheckItem event - Occurs when the user unchecks the item.
private void extoolbar1_UncheckItem(object sender,exontrol.EXTOOLBARLib.Item Itm)
{
	System.Diagnostics.Debug.Print( "UncheckItem event on Itm object" );
}
//this.extoolbar1.UncheckItem += new exontrol.EXTOOLBARLib.exg2antt.UncheckItemEventHandler(this.extoolbar1_UncheckItem);

exontrol.EXTOOLBARLib.Items var_Items = extoolbar1.Items;
	var_Items.Add("Item",null,null).Check = true;
	var_Items.Add("Item",null,null).Check = true;
extoolbar1.Refresh();

JScript/JavaScript

<BODY onload='Init()'>
<SCRIPT FOR="ToolBar1" EVENT="UncheckItem(Itm)" LANGUAGE="JScript">
	alert( "UncheckItem event on Itm object" );
</SCRIPT>

<OBJECT CLASSID="clsid:DDF58CFA-750F-45E0-8A00-CFBE431702E2" id="ToolBar1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	var var_Items = ToolBar1.Items;
		var_Items.Add("Item",null,null).Check = true;
		var_Items.Add("Item",null,null).Check = true;
	ToolBar1.Refresh();
}
</SCRIPT>
</BODY>

VBScript

<BODY onload='Init()'>
<SCRIPT LANGUAGE="VBScript">
Function ToolBar1_UncheckItem(Itm)
	With ToolBar1
		alert( "UncheckItem event on Itm object" )
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:DDF58CFA-750F-45E0-8A00-CFBE431702E2" id="ToolBar1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With ToolBar1
		With .Items
			.Add("Item").Check = True
			.Add("Item").Check = True
		End With
		.Refresh 
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

// UncheckItem event - Occurs when the user unchecks the item.
private void axToolBar1_UncheckItem(object sender, AxEXTOOLBARLib._IToolBarEvents_UncheckItemEvent e)
{
	System.Diagnostics.Debug.Print( "UncheckItem event on Itm object" );
}
//this.axToolBar1.UncheckItem += new AxEXTOOLBARLib._IToolBarEvents_UncheckItemEventHandler(this.axToolBar1_UncheckItem);

EXTOOLBARLib.Items var_Items = axToolBar1.Items;
	var_Items.Add("Item",null,null).Check = true;
	var_Items.Add("Item",null,null).Check = true;
axToolBar1.Refresh();

X++ (Dynamics Ax 2009)

// UncheckItem event - Occurs when the user unchecks the item.
void onEvent_UncheckItem(COM _Itm)
{
	;
	print( "UncheckItem event on Itm object" );
}

public void init()
{
	COM com_Item,com_Items;
	anytype var_Item,var_Items;
	;

	super();

	var_Items = extoolbar1.Items(); com_Items = var_Items;
		var_Item = COM::createFromObject(com_Items.Add("Item")); com_Item = var_Item;
		com_Item.Check(true);
		var_Item = COM::createFromObject(com_Items.Add("Item")); com_Item = var_Item;
		com_Item.Check(true);
	extoolbar1.Refresh();
}

Delphi 8 (.NET only)

// UncheckItem event - Occurs when the user unchecks the item.
procedure TWinForm1.AxToolBar1_UncheckItem(sender: System.Object; e: AxEXTOOLBARLib._IToolBarEvents_UncheckItemEvent);
begin
	with AxToolBar1 do
	begin
		OutputDebugString( 'UncheckItem event on Itm object' );
	end
end;

with AxToolBar1 do
begin
	with Items do
	begin
		Add('Item',Nil,Nil).Check := True;
		Add('Item',Nil,Nil).Check := True;
	end;
	Refresh();
end

Delphi (standard)

// UncheckItem event - Occurs when the user unchecks the item.
procedure TForm1.ToolBar1UncheckItem(ASender: TObject; Itm : IItem);
begin
	with ToolBar1 do
	begin
		OutputDebugString( 'UncheckItem event on Itm object' );
	end
end;

with ToolBar1 do
begin
	with Items do
	begin
		Add('Item',Null,Null).Check := True;
		Add('Item',Null,Null).Check := True;
	end;
	Refresh();
end

VFP

*** UncheckItem event - Occurs when the user unchecks the item. ***
LPARAMETERS Itm
	with thisform.ToolBar1
		DEBUGOUT( "UncheckItem event on Itm object" )
	endwith

with thisform.ToolBar1
	with .Items
		.Add("Item").Check = .T.
		.Add("Item").Check = .T.
	endwith
	.Refresh
endwith

dBASE Plus

/*
with (this.ACTIVEX1.nativeObject)
	UncheckItem = class::nativeObject_UncheckItem
endwith
*/
// Occurs when the user unchecks the item.
function nativeObject_UncheckItem(Itm)
	local oToolBar
	oToolBar = form.Activex1.nativeObject
	? "UncheckItem event on Itm object" 
return

local oToolBar,var_Item,var_Item1,var_Items

oToolBar = form.Activex1.nativeObject
var_Items = oToolBar.Items
	// var_Items.Add("Item").Check = true
	var_Item = var_Items.Add("Item")
	with (oToolBar)
		TemplateDef = [Dim var_Item]
		TemplateDef = var_Item
		Template = [var_Item.Check = true]
	endwith
	// var_Items.Add("Item").Check = true
	var_Item1 = var_Items.Add("Item")
	with (oToolBar)
		TemplateDef = [Dim var_Item1]
		TemplateDef = var_Item1
		Template = [var_Item1.Check = true]
	endwith
oToolBar.Refresh()

XBasic (Alpha Five)

' Occurs when the user unchecks the item.
function UncheckItem as v (Itm as OLE::Exontrol.ToolBar.1::IItem)
	Dim oToolBar as P
	oToolBar = topparent:CONTROL_ACTIVEX1.activex
	? "UncheckItem event on Itm object" 
end function

Dim oToolBar as P
Dim var_Item as P
Dim var_Item1 as P
Dim var_Items as P

oToolBar = topparent:CONTROL_ACTIVEX1.activex
var_Items = oToolBar.Items
	' var_Items.Add("Item").Check = .t.
	var_Item = var_Items.Add("Item")
	oToolBar.TemplateDef = "Dim var_Item"
	oToolBar.TemplateDef = var_Item
	oToolBar.Template = "var_Item.Check = True"

	' var_Items.Add("Item").Check = .t.
	var_Item1 = var_Items.Add("Item")
	oToolBar.TemplateDef = "Dim var_Item1"
	oToolBar.TemplateDef = var_Item1
	oToolBar.Template = "var_Item1.Check = True"

oToolBar.Refresh()

Visual Objects

METHOD OCX_Exontrol1UncheckItem(Itm) CLASS MainDialog
	// UncheckItem event - Occurs when the user unchecks the item.
	OutputDebugString(String2Psz( "UncheckItem event on Itm object" ))
RETURN NIL

local var_Items as IItems

var_Items := oDCOCX_Exontrol1:Items
	var_Items:Add("Item",nil,nil):Check := true
	var_Items:Add("Item",nil,nil):Check := true
oDCOCX_Exontrol1:Refresh()

PowerBuilder

/*begin event UncheckItem(oleobject Itm) - Occurs when the user unchecks the item.*/
/*
	OleObject oToolBar
	oToolBar = ole_1.Object
	MessageBox("Information",string( "UncheckItem event on Itm object" ))
*/
/*end event UncheckItem*/

OleObject oToolBar,var_Items

oToolBar = ole_1.Object
var_Items = oToolBar.Items
	var_Items.Add("Item").Check = true
	var_Items.Add("Item").Check = true
oToolBar.Refresh()

Visual DataFlex

// Occurs when the user unchecks the item.
Procedure OnComUncheckItem Variant llItm
	Forward Send OnComUncheckItem llItm
	Showln "UncheckItem event on Itm object"
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant voItem
		Get ComAdd of hoItems "Item" Nothing Nothing to voItem
		Handle hoItem
		Get Create (RefClass(cComItem)) to hoItem
		Set pvComObject of hoItem to voItem
			Set ComCheck of hoItem to True
		Send Destroy to hoItem
		Variant voItem1
		Get ComAdd of hoItems "Item" Nothing Nothing to voItem1
		Handle hoItem1
		Get Create (RefClass(cComItem)) to hoItem1
		Set pvComObject of hoItem1 to voItem1
			Set ComCheck of hoItem1 to True
		Send Destroy to hoItem1
	Send Destroy to hoItems
	Send ComRefresh
End_Procedure

XBase++

PROCEDURE OnUncheckItem(oToolBar,Itm)
	DevOut( "UncheckItem event on Itm object" )
RETURN

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

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

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

	oToolBar := XbpActiveXControl():new( oForm:drawingArea )
	oToolBar:CLSID  := "Exontrol.ToolBar.1" /*{DDF58CFA-750F-45E0-8A00-CFBE431702E2}*/
	oToolBar:create(,, {10,60},{610,370} )

		oToolBar:UncheckItem := {|Itm| OnUncheckItem(oToolBar,Itm)} /*Occurs when the user unchecks the item.*/

		oItems := oToolBar:Items()
			oItems:Add("Item"):Check := .T.
			oItems:Add("Item"):Check := .T.
		oToolBar:Refresh()

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