SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
An item has been expanded.
| VB.NET | Private Sub object_ItemExpanded(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.ItemExpanded |
| VB | Private Sub object_ItemExpanded(ByVal ItemIndex As Long) |
| C#.NET | void object_ItemExpanded(object sender, EventArgumentType e); |
| VC++ | void OnItemExpandedobject(long ItemIndex); |
| C | HRESULT OnItemExpandedobject(long ItemIndex); |
object
ItemIndex
The zero-based index of the item being expanded.
The ItemExpanded event occurs when an item has been expanded.
This is a notification only. No tree control items or cells should be manipulated while handling this event.
AxSftTree1.Items.Current = 0 ' select the first item
AxSftTree1.get_Item(0).Selected = True
AxSftTree1.Dock = DockStyle.Fill ' Maximize the main window
Me.WindowState = FormWindowState.Maximized
End Sub
Private Sub AxSftTree1_ItemExpanded(ByVal sender As System.Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_ItemExpandedEvent) Handles AxSftTree1.ItemExpanded
If e.itemIndex = 2 Then
AxWindowsMediaPlayer1.Ctlcontrols.play()
End If
End Sub
Private Sub AxSftTree1_ItemCollapsed(ByVal sender As System.Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_ItemCollapsedEvent) Handles AxSftTree1.ItemCollapsed
If e.itemIndex = 2 ThenEnd Sub Private Sub SftTree1_ItemCollapsed(ByVal ItemIndex As Long) If ItemIndex = 2 Then ' Here we make sure that the media stops playing when the control is not visible WindowsMediaPlayer1.Controls.pause End If End Sub Private Sub SftTree1_ItemExpanded(ByVal ItemIndex As Long) If ItemIndex = 2 Then ' Here we make sure that the media starts playing when the control is visible WindowsMediaPlayer1.Controls.Play End If End Sub Private Sub SftTree1_ItemDblClick(ByVal ItemIndex As Long, ByVal ColIndex As Integer, ByVal AreaType As Integer, ByVal Button As Integer, ByVal Shift As Integer)
axSftTree1.Items.Current = 0; // select the first item
axSftTree1.get_Item(0).Selected = true;
axSftTree1.Dock = DockStyle.Fill; // Maximize the main window
this.WindowState = FormWindowState.Maximized;
}
private void axSftTree1_ItemExpanded(object sender, _DSftTreeEvents_ItemExpandedEvent e) {
if (e.itemIndex == 2)
axWindowsMediaPlayer1.Ctlcontrols.play();
}
private void axSftTree1_ItemCollapsed(object sender, _DSftTreeEvents_ItemCollapsedEvent e) {
if (e.itemIndex == 2)
axWindowsMediaPlayer1.Ctlcontrols.pause();
void CContentWindowsDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
if (m_Tree.m_hWnd)
m_Tree.MoveWindow(0, 0, cx, cy);
}
void CContentWindowsDlg::OnItemExpandedSfttree1(long ItemIndex)
{
// Here we make sure that the media stops playing when the control is not visible
if (ItemIndex == 2)
m_WMPDialog.m_pCtlWMP1->controls->play();
}
void CContentWindowsDlg::OnItemCollapsedSfttree1(long ItemIndex)See Also SftTree Object | Object Hierarchy
