

| Type | Description | |||
| Item as Item | An Item object that's added to Group items collection. |
Use the AddItem event to notify your application that a new Item was added to Group. Use the Group property to get the owner group of the item. The AddItem method fires the AddItem event each time when a new item is added to items of the Group. Use the Add method to add new groups to the control.
Syntax for AddItem event, /NET version, on:
private void AddItem(object sender,exontrol.EXPLORERBARLib.Item Item)
{
}
Private Sub AddItem(ByVal sender As System.Object,ByVal Item As exontrol.EXPLORERBARLib.Item) Handles AddItem End Sub |
private void AddItem(object sender, AxEXPLORERBARLib._IExplorerBarEvents_AddItemEvent e)
{
}
void OnAddItem(LPDISPATCH Item)
{
}
void __fastcall AddItem(TObject *Sender,Explorerbarlib_tlb::IItem *Item)
{
}
procedure AddItem(ASender: TObject; Item : IItem); begin end; procedure AddItem(sender: System.Object; e: AxEXPLORERBARLib._IExplorerBarEvents_AddItemEvent); begin end; begin event AddItem(oleobject Item) end event AddItem Private Sub AddItem(ByVal sender As System.Object, ByVal e As AxEXPLORERBARLib._IExplorerBarEvents_AddItemEvent) Handles AddItem End Sub Private Sub AddItem(ByVal Item As EXPLORERBARLibCtl.IItem) End Sub Private Sub AddItem(ByVal Item As Object) End Sub LPARAMETERS Item PROCEDURE OnAddItem(oExplorerBar,Item) RETURN |
<SCRIPT EVENT="AddItem(Item)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function AddItem(Item) End Function </SCRIPT> Procedure OnComAddItem Variant llItem Forward Send OnComAddItem llItem End_Procedure METHOD OCX_AddItem(Item) CLASS MainDialog RETURN NIL void onEvent_AddItem(COM _Item)
{
}
function AddItem as v (Item as OLE::Exontrol.ExplorerBar.1::IItem) end function function nativeObject_AddItem(Item) return |
The following VB sample changes the item's alignment when a new items is added to the first group:
Private Sub ExplorerBar1_AddItem(ByVal Item As EXPLORERBARLibCtl.IItem)
With Item
If (.Group.Index = 0) Then
.Alignment = exRight
End If
End With
End SubThe following C++ sample changes the item's alignment when a new items is added to the first group:
void OnAddItemExplorerbar1(LPDISPATCH Item)
{
CItem item( Item ); item.m_bAutoRelease = FALSE;
if ( item.GetGroup().GetIndex() == 0 )
item.SetAlignment( 2 /*exRight*/ );
}The following VB.NET sample changes the item's alignment when a new items is added to the first group:
Private Sub AxExplorerBar1_AddItem(ByVal sender As Object, ByVal e As AxEXPLORERBARLib._IExplorerBarEvents_AddItemEvent) Handles AxExplorerBar1.AddItem
With e.item
If (.Group.Index = 0) Then
.Alignment = EXPLORERBARLib.AlignmentEnum.exRight
End If
End With
End SubThe following C# sample changes the item's alignment when a new items is added to the first group:
private void axExplorerBar1_AddItem(object sender, AxEXPLORERBARLib._IExplorerBarEvents_AddItemEvent e)
{
if (e.item.Group.Index == 0)
e.item.Alignment = EXPLORERBARLib.AlignmentEnum.exRight;
}The following VFP sample changes the item's alignment when a new items is added to the first group:
*** ActiveX Control Event *** LPARAMETERS item with item If (.Group.Index = 0) Then .Alignment = 2 && exRight EndIf endwith