HeaderPane
Main
Hide
Share Link
Print

SftBox.Items Property

Returns the SftBoxItems object.

Syntax

Get

C#SftBoxItems refItemsObj = object.Items;
VB.NETrefItemsObj = object.Items As SftBoxItems
C++ISftBoxItems* refItemsObj = object->Items;
ISftBoxItems* refItemsObj = object->GetItems();
CHRESULT object->get_Items(ISftBoxItems** refItemsObj);
VBSet refItemsObj = object.Items As SftBoxItems

object

A SftBox object.

refItemsObj

Returns the SftBoxItems object.

Comments

The Items property returns the SftBoxItems object.

The default properties and behavior of all items can be updated using the returned SftBoxItems object.

A SftBoxItem object for a specific item can be retrieved using the Item property.

Examples

VB.NET View entire sample code

    Application.Exit()
End Sub

Private Sub CopyImageFromCurrentItem()

    Dim ItemIndex As Integer
    Dim Img As SftPictureObject

    ItemIndex = AxSftBox1.Items.Selection
    If ItemIndex < 0 Then Exit Sub

    ' don't use images that are too large in the other areas
    Img = AxSftBox1.get_Cell(ItemIndex, 0).Image
    If Img.ActualHeight <= 20 And Img.ActualWidth <= 20 Then
        AxSftBox1.RowColumnHeader.Image = Img
        AxSftBox1.get_Header(1).Image = Img

VB6 View entire sample code

Option Explicit

Dim SortDirection As Boolean

Private Sub CopyImageFromCurrentItem()
    Dim ItemIndex As Integer
    Dim Img As SftPictureObject

    ItemIndex = SftBox1.Items.Selection
    If ItemIndex < 0 Then Exit Sub

    ' don't use images that are too large in the other areas
    Set Img = SftBox1.Cell(ItemIndex, 0).Image
    If Img.ActualHeight <= 20 And Img.ActualWidth <= 20 Then
        SftBox1.RowColumnHeader.Image = Img
        SftBox1.Header(1).Image = Img

C# View entire sample code

    Application.Exit();
}

private void CopyImageFromCurrentItem()
{
    int ItemIndex;
    SftPictureObject Img;

    ItemIndex = axSftBox1.Items.Selection;
    if (ItemIndex < 0)
        return;

    // don't use images that are too large in the other areas
    Img = axSftBox1.get_Cell(ItemIndex, 0).Image;
    if (Img.ActualHeight <= 20 && Img.ActualWidth <= 20) {
        axSftBox1.RowColumnHeader.Image = Img;

C++ View entire sample code

    // Set the icon for this dialog.  The framework does this automatically
    //  when the application's main window is not a dialog
    SetIcon(m_hIcon, TRUE);            // Set big icon
    SetIcon(m_hIcon, FALSE);        // Set small icon

    m_vBox = m_Box.GetControlUnknown();
    ASSERT(m_vBox != NULL);

    long ItemIndex = m_vBox->Items->Add("Supported Picture Types");

    m_vBox->Cell[ItemIndex][1]->Text = _T("SftBox/OCX supports numerous image types, such as GDI+ images, bitmaps, icons, ImageLists and also offers numerous built-in images.");

    // add GDI+ samples

    ItemIndex = m_vBox->Items->Add(_T("GDI+ Images"));
    m_vBox->Item[ItemIndex]->Level = 1;

See Also SftBox Object | Object Hierarchy


Last Updated 11/03/2026 - (email)
© 2026 Softel vdm, Inc.