Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBox.Columns Property

Returns the SftBoxColumns object.

Syntax

Get

VB.NETrefColumnsObj = object.Columns As SftBoxColumns
VBSet refColumnsObj = object.Columns As SftBoxColumns
C#.NETSftBoxColumns refColumnsObj = object.Columns;
VC++ISftBoxColumns* refColumnsObj = object->Columns;
ISftBoxColumns* refColumnsObj = object->GetColumns();
CHRESULT object->get_Columns(ISftBoxColumns** refColumnsObj);

object

A SftBox object.

refColumnsObj

Returns a reference to the control's SftBoxColumns object.

Comments

The Columns property returns the SftBoxColumns object.

The properties and behavior of all columns can be updated using the returned SftBoxColumns object.

A SftBoxColumn object for a specific column can be retrieved using the Column property.

Examples

VB.NET

Private Sub UpdateFontNames()
    ' add all font names
    fontNames.BulkUpdate = True
    fontNames.Items.Clear()
    fontNames.Items.AddFontNames(-1, SftBoxFontConstants.fontSftBoxAll, True, 0)
    fontNames.Items.Selection = 0
    PerformSort(fontNames, SftBoxSortConstants.sortSftBoxAscending)
    fontNames.BulkUpdate = False
    fontNames.Columns.MakeOptimal(0)
    fontNames.Items.RecalcHorizontalExtent(0)
End Sub

Private Sub UpdateFontStyles()
    ' add all styles for the current font name
    If fontNames.Items.Selection >= 0 Then
        Dim OldText As String = fontStyles.Edit.Text

VB6

Private Sub UpdateFontNames()
    ' add all font names
    FontNames.BulkUpdate = True
    FontNames.Items.Clear
    FontNames.Items.AddFontNames -1, fontSftBoxAll, True, 0
    FontNames.Items.Selection = 0
    PerformSort FontNames
    FontNames.BulkUpdate = False
    FontNames.Columns.MakeOptimal 0
    FontNames.Items.RecalcHorizontalExtent 0
End Sub

Private Sub FontNames_SelectionChange()
    UpdateStyles
End Sub

C#

{
    // add all font names
    fontNames.BulkUpdate = true;
    fontNames.Items.Clear();
    fontNames.Items.AddFontNames(-1, SftBoxFontConstants.fontSftBoxAll, true, 0);
    fontNames.Items.Selection = 0;
    PerformSort(fontNames, SftBoxSortConstants.sortSftBoxAscending);
    fontNames.BulkUpdate = false;
    fontNames.Columns.MakeOptimal(0);
    fontNames.Items.RecalcHorizontalExtent(0);
}

private void UpdateFontStyles()
{
    // add all styles for the current font name
    if (fontNames.Items.Selection >= 0) {

C++

    ISftBoxPtr vFontNames = m_FontNames.GetControlUnknown();

    vFontNames->BulkUpdate = VARIANT_TRUE;
    vFontNames->Items->Clear();
    vFontNames->Items->AddFontNames(-1, fontSftBoxAll, VARIANT_TRUE, 0);
    vFontNames->Items->Selection = 0;
    PerformSort(vFontNames, sortSftBoxAscending);
    vFontNames->BulkUpdate = VARIANT_FALSE;
    vFontNames->Columns->MakeOptimal(0);
    vFontNames->Items->RecalcHorizontalExtent(0);

    m_CondHeaders.SetCheck(1);
}

void CFontDlgDlg::UpdateFontStyles()
{

See Also SftBox Object | Object Hierarchy


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