Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBox.Column Property

Returns a SftBoxColumn object for a given column.

Syntax

Get

VB.NETrefColumnObj = object.get_Column(ByVal ColNum As Short) As SftBoxColumn
VBSet refColumnObj = object.Column(ByVal ColNum As Integer) As SftBoxColumn
C#.NETSftBoxColumn refColumnObj = object.get_Column(short ColNum);
VC++ISftBoxColumn* refColumnObj = object->Column[short ColNum];
ISftBoxColumn* refColumnObj = object->GetColumn(short ColNum);
CHRESULT object->get_Column(short ColNum, ISftBoxColumn** refColumnObj);

object

A SftBox object.

ColNum

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

refColumnObj

Returns a reference to the SftBoxColumn object for column ColNum.

Comments

The Column property returns a SftBoxColumn object for a given column.

The properties of the column can be updated using the returned SftBoxColumn object.

Examples

VB.NET

    AddBuiltinImage("Enabled Ascending Indicator", SftPictureImageConstants.sftImageSortAsc, 8, 8)
    AddBuiltinImage("Disabled Ascending Indicator", SftPictureImageConstants.sftImageSortAscDisabled, 8, 8)
    AddBuiltinImage("Enabled Descending Indicator", SftPictureImageConstants.sftImageSortDesc, 8, 8)
    AddBuiltinImage("Disabled Descending Indicator", SftPictureImageConstants.sftImageSortDescDisabled, 8, 8)


    AxSftBox1.RowHeaders.MakeOptimal(0) ' make the row headers optimal
    AxSftBox1.get_Column(0).MakeOptimal(0) ' make the first column optimal
    AxSftBox1.Items.RecalcHorizontalExtent(0) ' update horizontal scroll bar

    AxSftBox1.Items.Selection = 0

    CopyImageFromCurrentItem()
End Sub

Private Sub ExpandCollapseItem(ByVal ItemIndex As Long, ByVal Shift As Short)

VB6

        AddBuiltinImage "Enabled Ascending Indicator", sftImageSortAsc, 8, 8
        AddBuiltinImage "Disabled Ascending Indicator", sftImageSortAscDisabled, 8, 8
        AddBuiltinImage "Enabled Descending Indicator", sftImageSortDesc, 8, 8
        AddBuiltinImage "Disabled Descending Indicator", sftImageSortDescDisabled, 8, 8


        .RowHeaders.MakeOptimal 0 ' make the row headers optimal
        .Column(0).MakeOptimal 0 ' make the first column optimal
        .Items.RecalcHorizontalExtent 0 ' update horizontal scroll bar

        .Items.Selection = 0

        CopyImageFromCurrentItem

    End With

C#

    AddBuiltinImage("Enabled Ascending Indicator", SftPictureImageConstants.sftImageSortAsc, 8, 8);
    AddBuiltinImage("Disabled Ascending Indicator", SftPictureImageConstants.sftImageSortAscDisabled, 8, 8);
    AddBuiltinImage("Enabled Descending Indicator", SftPictureImageConstants.sftImageSortDesc, 8, 8);
    AddBuiltinImage("Disabled Descending Indicator", SftPictureImageConstants.sftImageSortDescDisabled, 8, 8);


    axSftBox1.RowHeaders.MakeOptimal(0); // make the row headers optimal
    axSftBox1.get_Column(0).MakeOptimal(0); // make the first column optimal
    axSftBox1.Items.RecalcHorizontalExtent(0); // update horizontal scroll bar

    axSftBox1.Items.Selection = 0;

    CopyImageFromCurrentItem();
}

private void ExpandCollapseItem(int ItemIndex, short Shift)

C++

    AddBuiltinImage(_T("Enabled Ascending Indicator"), sftImageSortAsc, 8, 8);
    AddBuiltinImage(_T("Disabled Ascending Indicator"), sftImageSortAscDisabled, 8, 8);
    AddBuiltinImage(_T("Enabled Descending Indicator"), sftImageSortDesc, 8, 8);
    AddBuiltinImage(_T("Disabled Descending Indicator"), sftImageSortDescDisabled, 8, 8);


    m_vBox->RowHeaders->MakeOptimal(0); // make the row headers optimal
    m_vBox->Column[0]->MakeOptimal(0); // make the first column optimal
    m_vBox->Items->RecalcHorizontalExtent(0); // update horizontal scroll bar

    m_vBox->Items->Selection = 0;

    CopyImageFromCurrentItem();

    return TRUE;  // return TRUE  unless you set the focus to a control
}

See Also SftBox Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.