Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBoxHeaders.ClearImages Method

Removes all column header graphics.

Syntax

VB.NETobject.ClearImages()
VBobject.ClearImages
C#.NETvoid object.ClearImages();
VC++HRESULT object->ClearImages();
CHRESULT object->raw_ClearImages();

object

A SftBoxHeaders object.

Comments

The ClearImages method removes all column header graphics.

Column header pictures are defined using the Header.Image property.

Examples

VB.NET

    companyList.get_Cell(index, 5).Text = Country
    companyList.get_Cell(index, 6).Text = Phone
    companyList.get_Cell(index, 7).Text = Fax
End Sub

Private Sub PerformSort(ByVal column As Short, ByVal dir As SftBoxSortConstants)
    sortDirection = dir
    sortedColumn = column
    companyList.Headers.ClearImages()
    If sortDirection = SftBoxSortConstants.sortSftBoxAscending Then
        companyList.get_Header(column).Image.Appearance = SftPictureImageConstants.sftImageSortAsc
    Else
        companyList.get_Header(column).Image.Appearance = SftPictureImageConstants.sftImageSortDesc
    End If
    companyList.Items.Sort(-1, sortedColumn, sortDirection)
End Sub

VB6

    If AreaType = areaSftBoxColumn Then
        If SortedColumn = ColNum Then
            If CompanyList.Header(ColNum).Image.Appearance = sftImageSortAsc Then
                CompanyList.Header(ColNum).Image.Appearance = sftImageSortDesc
            Else
                CompanyList.Header(ColNum).Image.Appearance = sftImageSortAsc
            End If
        Else
            CompanyList.Headers.ClearImages
            CompanyList.Header(ColNum).Image.Appearance = sftImageSortAsc
        End If
        SortedColumn = ColNum
        PerformSort
    End If
End Sub

C#

    companyList.get_Cell(index, 6).Text = Phone;
    companyList.get_Cell(index, 7).Text = Fax;
}

private void PerformSort(short column, SftBoxSortConstants dir)
{
    sortDirection = dir;
    sortedColumn = column;
    companyList.Headers.ClearImages();
    if (sortDirection == SftBoxSortConstants.sortSftBoxAscending)
        companyList.get_Header(column).Image.Appearance = SftPictureImageConstants.sftImageSortAsc;
    else
        companyList.get_Header(column).Image.Appearance = SftPictureImageConstants.sftImageSortDesc;
    companyList.Items.Sort(-1, sortedColumn, sortDirection);
}

C++

}

void CDataInputDlg::PerformSort(short column, SftBoxSortConstants dir)
{
    m_sortDirection = dir;
    m_sortedColumn = column;

    ISftBoxPtr vCompanyList = m_CompanyList.GetControlUnknown();
    vCompanyList->Headers->ClearImages();
    if (m_sortDirection == sortSftBoxAscending)
        vCompanyList->Header[column]->Image->Appearance = sftImageSortAsc;
    else
        vCompanyList->Header[column]->Image->Appearance = sftImageSortDesc;
    vCompanyList->Items->Sort(-1, m_sortedColumn, m_sortDirection);
}

See Also SftBoxHeaders Object | Object Hierarchy


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