Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBox.DropDown Property

Returns the SftBoxDropDown object.

Syntax

Get

VB.NETrefDropDownObj = object.DropDown As SftBoxDropDown
VBSet refDropDownObj = object.DropDown As SftBoxDropDown
C#.NETSftBoxDropDown refDropDownObj = object.DropDown;
VC++ISftBoxDropDown* refDropDownObj = object->DropDown;
ISftBoxDropDown* refDropDownObj = object->GetDropDown();
CHRESULT object->get_DropDown(ISftBoxDropDown** refDropDownObj);

object

A SftBox object.

refDropDownObj

Returns a reference to the control's SftBoxDropDown object.

Comments

The DropDown property returns the SftBoxDropDown object.

The properties and behavior of the drop down portion of the control can be updated using the returned SftBoxDropDown object.

Examples

VB.NET

Private Sub AxSftBox1_ItemClick(ByVal sender As Object, ByVal e As AxSftBoxLib50._ISftBoxEvents_ItemClickEvent) Handles AxSftBox1.ItemClick
    Select Case e.areaType
    Case SftBoxAreaConstants.areaSftBoxColumn
        If e.colNum = 0 Then
            SetSortDirection(Not m_SortDirection)
        End If
    Case SftBoxAreaConstants.areaSftBoxCellGraphic
        If e.part = SftBoxPortionConstants.partSftBoxDropDown Then
            AxSftBox1.DropDown.Suppress() ' Make sure we don't close the drop down
        End If
        ToggleImage(AxSftBox1.get_Cell(e.itemIndex, e.colNum).Image)
    Case SftBoxAreaConstants.areaSftBoxItem
        If e.part = SftBoxPortionConstants.partSftBoxDropDown Then
            AxSftBox1.DropDown.Suppress() ' Make sure we don't close the drop down
        End If
        ToggleImage(AxSftBox1.get_Item(e.itemIndex).Image)

VB6

        .Items.RecalcHorizontalExtent 0 ' update horizontal scroll bar

        .Items.Selection = 0

        CopyImageFromCurrentItem

    End With

    SftBox1.DropDown.Dropped = True
End Sub

Private Sub ExpandCollapseItem(ByVal ItemIndex As Long, ByVal Shift As Integer)
    Dim Item As SftBoxItem
    Set Item = SftBox1.Item(ItemIndex)
    If Item.Expanded Then
        Item.Collapse True

C#

{
    switch (e.areaType) {
    case SftBoxAreaConstants.areaSftBoxColumn:
        if (e.colNum == 0)
            SetSortDirection(!m_SortDirection);
        break;
    case SftBoxAreaConstants.areaSftBoxCellGraphic:
        if (e.part == SftBoxPortionConstants.partSftBoxDropDown)
            axSftBox1.DropDown.Suppress(); // Make sure we don't close the drop down
        ToggleImage(axSftBox1.get_Cell(e.itemIndex, e.colNum).Image);
        break;
    case SftBoxAreaConstants.areaSftBoxItem:
        if (e.part == SftBoxPortionConstants.partSftBoxDropDown)
            axSftBox1.DropDown.Suppress(); // Make sure we don't close the drop down
        ToggleImage(axSftBox1.get_Item(e.itemIndex).Image);
        break;

C++

{
    switch (AreaType) {
    case areaSftBoxColumn:
        if (ColNum == 0)
            SetSortDirection(!m_fSortDirection);
        break;
    case areaSftBoxCellGraphic:
        if (Part == partSftBoxDropDown)
            m_vBox->DropDown->Suppress(); // Make sure we don't close the drop down
        ToggleImage(m_vBox->Cell[ItemIndex][ColNum]->Image);
        break;
    case areaSftBoxItem:
        if (Part == partSftBoxDropDown)
            m_vBox->DropDown->Suppress(); // Make sure we don't close the drop down
        ToggleImage(m_vBox->Item[ItemIndex]->Image);
        break;

See Also SftBox Object | Object Hierarchy


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