Basically I added the following to the .ctl file: Private m_bMoveableTabs As Boolean
Public Property Get MoveableTabs() As Boolean
MoveableTabs = m_bMoveableTabs
End Property
Public Property Let MoveableTabs(ByVal value As Boolean)
If (m_bMoveableTabs <> value) Then
m_bMoveableTabs = value
drawTabs
PropertyChanged "MoveableTabs"
End If
End Property
<UserControl_MouseMove>
...
' Tab mouse move processing:
If (m_iDraggingTab > 0) And (Button = vbLeftButton) And (m_bMoveableTabs) Then
If (m_bJustReplaced) Then
If m_iDraggingTab <> hitTestTab() Then
If Abs(tP.x - m_tJustReplacedPoint.x) > (m_tTab(m_iDraggingTab).tTabR.Right - m_tTab(m_iDraggingTab).tTabR.Left) / 2 Then
m_bJustReplaced = False
Else
Exit Sub
End If
Else
m_bJustReplaced = False
End If
End If
...
I also added the appropriate stuff to the Read and WriteProperties code. As you can see from the above sections, all it does is ignore the dragging code if m_bMoveableTabs is not true. |