Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBoxDropDown.Dropped Property

Defines whether the drop down portion is shown/hidden.

Syntax

Get

VB.NETBoolean = object.Dropped As Boolean
VBBoolean = object.Dropped As Boolean
C#.NETbool Boolean = object.Dropped;
VC++VARIANT_BOOL Boolean = object->Dropped;
VARIANT_BOOL Boolean = object->GetDropped();
CHRESULT object->get_Dropped(VARIANT_BOOL* Boolean);

Put

VB.NETobject.Dropped = Boolean As Boolean
VBobject.Dropped = Boolean As Boolean
C#.NETbool object.Dropped = Boolean;
VC++VARIANT_BOOL object->Dropped = Boolean;
void object->PutDropped(VARIANT_BOOL Boolean);
CHRESULT object->put_Dropped(VARIANT_BOOL Boolean);

object

A SftBoxDropDown object.

Boolean

Defines whether the drop down portion is shown/hidden.

BooleanDescription
TrueThe drop down portion is shown.
FalseThe drop down portion is hidden.

Comments

The Dropped property defines whether the drop down portion is shown/hidden.

The drop down portion can only be visible when the control has the input focus. Setting the Dropped property when the control does not have the input focus will set the input focus to the control and display the drop down portion.

The DropDown.RollUp method can also be used to hide the drop down portion.

This property cannot be used with a simple combo box.

Examples

VB.NET

    e.allowedEffects = vbDropEffectCopy Or vbDropEffectMove
    Dim textData As String = comboSource.get_Cell(comboSource.Items.Selection, 0).Text
    e.data.SetData(textData, SftOLEClipboardConstants.sftCFText)
End Sub

Private Sub comboTarget_OLEDragOver(ByVal sender As Object, ByVal e As AxSftBoxLib50._ISftBoxEvents_OLEDragOverEvent) Handles comboTarget.OLEDragOver
    If e.state = SftBoxOLEDragOverConstants.enterSftBox Then
        ' Show the drop down portion
        comboTarget.DropDown.Dropped = True
    ElseIf e.state = SftBoxOLEDragOverConstants.leaveSftBox Then
        ' Hide the drop down portion with a delay, in case the
        ' user is moving from/to the static or drop down portion
        comboTarget.DropDown.RollUp(500)  ' 1/2 second
    End If
End Sub

VB6

Option Explicit

Private Sub ComboTarget_OLEDragOver(Data As SftBoxLib50.DataObject, TargetIndex As Long, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As SftBoxLib50.SftBoxOLEDragOverConstants)
    If State = enterSftBox Then
        ' Show the drop down portion
        ComboTarget.DropDown.Dropped = True
    ElseIf State = leaveSftBox Then
        ' Hide the drop down portion with a delay, in case the
        ' user is moving from/to the static or drop down portion
        ComboTarget.DropDown.RollUp 500  ' 1/2 second
    End If
End Sub

Private Sub ComboTarget_OLEDragDrop(Data As SftBoxLib50.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
    Dim ItemIndex As Long
    If Data.GetFormat(sftCFText) Then

C#

    string textData = comboSource.get_Cell(comboSource.Items.Selection, 0).Text;
    e.data.SetData(textData, SftOLEClipboardConstants.sftCFText);
}

private void comboTarget_OLEDragOver(object sender, AxSftBoxLib50._ISftBoxEvents_OLEDragOverEvent e)
{
    if (e.state == SftBoxOLEDragOverConstants.enterSftBox) {
        // Show the drop down portion
        comboTarget.DropDown.Dropped = true;
    } else if (e.state == SftBoxOLEDragOverConstants.leaveSftBox) {
        // Hide the drop down portion with a delay, in case the
        // user is moving from/to the static or drop down portion
        comboTarget.DropDown.RollUp(500);  // 1/2 second
    }
}

See Also SftBoxDropDown Object | Object Hierarchy


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