SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
The user is initiating an OLE drag & drop operation.
VB.NET | Private Sub object_DragStarting(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.DragStarting |
VB | Private Sub object_DragStarting(ByVal Part As SftBoxPortionConstants, ByVal Button As Integer, ByVal Shift As Integer, ByVal xPos As OLE_XPOS_PIXELS, ByVal yPos As OLE_YPOS_PIXELS) |
C#.NET | void object_DragStarting(object sender, EventArgumentType e); |
VC++ | void OnDragStartingobject(enum SftBoxPortionConstants Part, short Button, short Shift, OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos); |
C | HRESULT OnDragStartingobject(enum SftBoxPortionConstants Part, short Button, short Shift, OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos); |
object
Part
Describes in which part of the combo box the potential OLE drag & drop operation has been detected.
Part | Value | Description |
---|---|---|
partSftBoxStatic | 1 | Static portion (not presently supported, reserved for future use) |
partSftBoxEdit | 2 | Edit control portion |
partSftBoxDropDown | 3 | Drop down portion |
Button
Describes the button(s) that are pressed. The Button argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event.
Button | Value | Description |
---|---|---|
constSftBoxLeftButton | 1 | The left mouse button was pressed. |
constSftBoxRightButton | 2 | The middle mouse button was pressed. |
constSftBoxMiddleButton | 4 | The right mouse button was pressed. |
Shift
Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The Shift argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed.
Shift | Value | Description |
---|---|---|
constSftBoxShiftMask | 1 | The SHIFT key is down. |
constSftBoxCtrlMask | 2 | The CONTROL key is down. |
constSftBoxAltMask | 4 | The ALT key is down. |
xPos
The x coordinate of the mouse cursor. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.
yPos
The y coordinate of the mouse cursor. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.
The DragStarting event occurs when the user is initiating an OLE drag & drop operation.
The DragStarting event occurs when the OLEDragMode property is set to OLEDragSftBoxManual and a potential drag & drop operation is detected.
The DragStarting event only occurs when a drag & drop operation is detected in the edit control portion or the drop down portion. The static portion cannot generate a DragStarting event.
If the combo box has an edit control portion (simple or drop down combo box), the user has clicked the mouse button on the currently selected text of the edit control portion. The Part parameter is set to partSftBoxEdit.
If the combo box has a drop down portion (drop down or drop down list combo box), the user has pressed the mouse button on an item and without releasing it, moved the cursor. The Part parameter is set to partSftBoxStatic or partSftBoxDropDown.
The application can start an OLE drag & drop operation by using the OLEDrag method.
comboTarget.Items.Add("A Source Item") comboTarget.Items.Add("Another Source Item") comboTarget.Items.Add("Last Source Item") comboTarget.Columns.MakeOptimal(0) comboTarget.Items.RecalcHorizontalExtent(0) End Sub Private Sub comboSource_DragStarting(ByVal sender As Object, ByVal e As AxSftBoxLib50._ISftBoxEvents_DragStartingEvent) Handles comboSource.DragStarting comboSource.OLEDrag() End Sub Private Sub comboSource_OLEStartDrag(ByVal sender As Object, ByVal e As AxSftBoxLib50._ISftBoxEvents_OLEStartDragEvent) Handles comboSource.OLEStartDrag e.allowedEffects = vbDropEffectCopy Or vbDropEffectMove Dim textData As String = comboSource.get_Cell(comboSource.Items.Selection, 0).Text e.data.SetData(textData, SftOLEClipboardConstants.sftCFText)
ToIndex = ToIndex + 1 Next ComboTarget.Items.Selection = ItemIndex End If ComboTarget.Columns.MakeOptimal 0 ComboTarget.Items.RecalcHorizontalExtent 0 End Sub Private Sub ComboSource_DragStarting(ByVal Part As SftBoxLib50.SftBoxPortionConstants, ByVal Button As Integer, ByVal Shift As Integer, ByVal xPos As Single, ByVal yPos As Single) ComboSource.OLEDrag End Sub Private Sub ComboSource_OLEStartDrag(Data As SftBoxLib50.DataObject, AllowedEffects As Long) AllowedEffects = vbDropEffectCopy Or vbDropEffectMove Data.SetData ComboSource.Cell(ComboSource.Items.Selection, 0).Text, sftCFText End Sub
comboTarget.Items.Add("A Source Item"); comboTarget.Items.Add("Another Source Item"); comboTarget.Items.Add("Last Source Item"); comboTarget.Columns.MakeOptimal(0); comboTarget.Items.RecalcHorizontalExtent(0); } private void comboSource_DragStarting(object sender, AxSftBoxLib50._ISftBoxEvents_DragStartingEvent e) { comboSource.OLEDrag(); } private void comboSource_OLEStartDrag(object sender, AxSftBoxLib50._ISftBoxEvents_OLEStartDragEvent e) { e.allowedEffects = vbDropEffectCopy | vbDropEffectMove; string textData = comboSource.get_Cell(comboSource.Items.Selection, 0).Text;
See Also SftBox Object | Object Hierarchy