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.EXRIBBONLib.Item Itm)
{
}

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

Syntax for UncheckItem event, /COM version, on:

private void UncheckItem(object sender, AxEXRIBBONLib._IRibbonEvents_UncheckItemEvent e)
{
}

void OnUncheckItem(LPDISPATCH Itm)
{
}

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

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

procedure UncheckItem(sender: System.Object; e: AxEXRIBBONLib._IRibbonEvents_UncheckItemEvent);
begin
end;

begin event UncheckItem(oleobject Itm)
end event UncheckItem

Private Sub UncheckItem(ByVal sender As System.Object, ByVal e As AxEXRIBBONLib._IRibbonEvents_UncheckItemEvent) Handles UncheckItem
End Sub

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

Private Sub UncheckItem(ByVal Itm As Object)
End Sub

LPARAMETERS Itm

PROCEDURE OnUncheckItem(oRibbon,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.Ribbon.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 Ribbon1_UncheckItem(ByVal Itm As Object)
	With Ribbon1
		Debug.Print( "UncheckItem event on Itm object" )
	End With
End Sub

With Ribbon1
	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 Ribbon1_UncheckItem(ByVal Itm As EXRIBBONLibCtl.IItem)
	With Ribbon1
		Debug.Print( "UncheckItem event on Itm object" )
	End With
End Sub

With Ribbon1
	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 Exribbon1_UncheckItem(ByVal sender As System.Object,ByVal Itm As exontrol.EXRIBBONLib.Item) Handles Exribbon1.UncheckItem
	With Exribbon1
		Debug.Print( "UncheckItem event on Itm object" )
	End With
End Sub

With Exribbon1
	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 AxRibbon1_UncheckItem(ByVal sender As System.Object, ByVal e As AxEXRIBBONLib._IRibbonEvents_UncheckItemEvent) Handles AxRibbon1.UncheckItem
	With AxRibbon1
		Debug.Print( "UncheckItem event on Itm object" )
	End With
End Sub

With AxRibbon1
	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 OnUncheckItemRibbon1(LPDISPATCH Itm)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXRIBBONLib' for the library: 'ExRibbon 1.0 Control Library'
		#import <ExRibbon.dll>
		using namespace EXRIBBONLib;
	*/
	EXRIBBONLib::IRibbonPtr spRibbon1 = GetDlgItem(IDC_RIBBON1)->GetControlUnknown();
	OutputDebugStringW( L"UncheckItem event on Itm object" );
}

EXRIBBONLib::IRibbonPtr spRibbon1 = GetDlgItem(IDC_RIBBON1)->GetControlUnknown();
EXRIBBONLib::IItemsPtr var_Items = spRibbon1->GetItems();
	var_Items->Add(L"Item",vtMissing,vtMissing)->PutCheck(VARIANT_TRUE);
	var_Items->Add(L"Item",vtMissing,vtMissing)->PutCheck(VARIANT_TRUE);
spRibbon1->Refresh();

C++ Builder

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

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

C#

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

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

JScript/JavaScript

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

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

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

VBScript

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

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Ribbon1
		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 axRibbon1_UncheckItem(object sender, AxEXRIBBONLib._IRibbonEvents_UncheckItemEvent e)
{
	System.Diagnostics.Debug.Print( "UncheckItem event on Itm object" );
}
//this.axRibbon1.UncheckItem += new AxEXRIBBONLib._IRibbonEvents_UncheckItemEventHandler(this.axRibbon1_UncheckItem);

EXRIBBONLib.Items var_Items = axRibbon1.Items;
	var_Items.Add("Item",null,null).Check = true;
	var_Items.Add("Item",null,null).Check = true;
axRibbon1.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 = exribbon1.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);
	exribbon1.Refresh();
}

Delphi 8 (.NET only)

// UncheckItem event - Occurs when the user unchecks the item.
procedure TWinForm1.AxRibbon1_UncheckItem(sender: System.Object; e: AxEXRIBBONLib._IRibbonEvents_UncheckItemEvent);
begin
	with AxRibbon1 do
	begin
		OutputDebugString( 'UncheckItem event on Itm object' );
	end
end;

with AxRibbon1 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.Ribbon1UncheckItem(ASender: TObject; Itm : IItem);
begin
	with Ribbon1 do
	begin
		OutputDebugString( 'UncheckItem event on Itm object' );
	end
end;

with Ribbon1 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.Ribbon1
		DEBUGOUT( "UncheckItem event on Itm object" )
	endwith

with thisform.Ribbon1
	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 oRibbon
	oRibbon = form.Activex1.nativeObject
	? "UncheckItem event on Itm object" 
return

local oRibbon,var_Item,var_Item1,var_Items

oRibbon = form.Activex1.nativeObject
var_Items = oRibbon.Items
	// var_Items.Add("Item").Check = true
	var_Item = var_Items.Add("Item")
	with (oRibbon)
		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 (oRibbon)
		TemplateDef = [Dim var_Item1]
		TemplateDef = var_Item1
		Template = [var_Item1.Check = true]
	endwith
oRibbon.Refresh()

XBasic (Alpha Five)

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

Dim oRibbon as P
Dim var_Item as P
Dim var_Item1 as P
Dim var_Items as P

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

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

oRibbon.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 oRibbon
	oRibbon = ole_1.Object
	MessageBox("Information",string( "UncheckItem event on Itm object" ))
*/
/*end event UncheckItem*/

OleObject oRibbon,var_Items

oRibbon = ole_1.Object
var_Items = oRibbon.Items
	var_Items.Add("Item").Check = true
	var_Items.Add("Item").Check = true
oRibbon.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(oRibbon,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 oRibbon

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

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

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

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

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