HeaderPane
Main
Hide
Share Link
Print

SftBox.Cell Property

Returns a SftBoxCell object for a given item index and column number.

Syntax

Get

C#SftBoxCell refCellObj = object.get_Cell(int ItemIndex, short ColNum);
VB.NETrefCellObj = object.get_Cell(ByVal ItemIndex As Integer, ByVal ColNum As Short) As SftBoxCell
C++ISftBoxCell* refCellObj = object->Cell[long ItemIndex][short ColNum];
ISftBoxCell* refCellObj = object->GetCell(long ItemIndex, short ColNum);
CHRESULT object->get_Cell(long ItemIndex, short ColNum, ISftBoxCell** refCellObj);
VBSet refCellObj = object.Cell(ByVal ItemIndex As Long, ByVal ColNum As Integer) As SftBoxCell

object

A SftBox object.

ItemIndex

The zero-based index of the item. The item index is determined by the item's position in the control and is also returned by the methods used to add or insert items.

ColNum

The zero-based index of the column to be accessed. The number of available columns is defined using the Columns.Count property.

refCellObj

Returns a reference to the SftBoxCell object for the cell at column ColNum of the item ItemIndex.

Comments

The Cell property returns a SftBoxCell object for a given item index and column number.

The properties of the cell can be updated using the returned SftBoxCell object.

The Cell property is identical to the Item.Cell property. They return the same object.

Examples

VB.NET View entire sample code

    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
    Else
        AxSftBox1.RowColumnHeader.Image.Clear()
        AxSftBox1.get_Header(1).Image.Clear()
    End If
End Sub

VB6 View entire sample code

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
    Else
        SftBox1.RowColumnHeader.Image.Clear
        SftBox1.Header(1).Image.Clear
    End If

C# View entire sample code

    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;
        axSftBox1.get_Header(1).Image = Img;
    } else {
        axSftBox1.RowColumnHeader.Image.Clear();
        axSftBox1.get_Header(1).Image.Clear();
    }

C++ View entire sample code

    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;
    m_vBox->Cell[ItemIndex][1]->Text = _T("All GDI+ images are supported, like GIF, JPEG, Exif, PNG, TIFF and device-independent bitmaps (up to 64bpp) with semi-transparent and translucent areas.");

See Also SftBox Object | Object Hierarchy


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