event RemoveItem (Item as Item)
Fired when an item was removed.

 TypeDescription 
   Item as Item An Item object being removed.  

use the RemoveItem event to notify your application that an Item is removed. Use the RemoveItem event to release any extra data hold by an Item object. Use the RemoveItem method to remove an item. The control fires the RemoveGroup event  when a group is removed. Use the UserData property to associate an extra data to an item. Use the Visible property to hide an item.

The following VB sample prints the caption of the item being removed:

Private Sub ExplorerBar1_RemoveItem(ByVal Item As EXPLORERBARLibCtl.IItem)
    With Item
        Debug.Print .Caption
    End With
End Sub

The following C++ sample prints the caption of the item being removed:

void OnRemoveItemExplorerbar1(LPDISPATCH Item) 
{
	CItem item( Item ); item.m_bAutoRelease = FALSE;
	CString strOutput;
	strOutput.Format("%s", (LPCTSTR)item.GetCaption() );
	OutputDebugString( strOutput );		
}

The following VB.NET sample prints the caption of the item being removed:

Private Sub AxExplorerBar1_RemoveItem(ByVal sender As Object, ByVal e As AxEXPLORERBARLib._IExplorerBarEvents_RemoveItemEvent) Handles AxExplorerBar1.RemoveItem
    With e.item
        Debug.WriteLine(.Caption)
    End With
End Sub

The following C# sample prints the caption of the item being removed:

private void axExplorerBar1_RemoveItem(object sender, AxEXPLORERBARLib._IExplorerBarEvents_RemoveItemEvent e)
{
	System.Diagnostics.Debug.WriteLine(e.item.Caption);
}

The following VFP sample prints the caption of the item being removed:

*** ActiveX Control Event ***
LPARAMETERS item

with item
	wait window nowait .Caption
endwith



Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.