扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:东方欲晓 来源:yesky 2007年10月15日
关键字:
Set currNode = SmartTreeView.Nodes.Add (SmartTreeView.SelectedItem, tvwChild) currNode.Text = "" SmartTreeView.StartLabelEdit |
If Shift And vbCtrlMask Then Set currNode = SmartTreeView.Nodes.Add() currNode.Selected = True SmartTreeView.StartLabelEdit End If |
Dim Repeat As Boolean Repeat = True While Repeat On Error Resume Next SmartTreeView.SelectedItem.Key = "K" & 1 + Int(Rnd() * 10000000) If Err.Number = 0 Then Repeat = False Wend |
Private Sub SmartTreeView_OLEStartDrag( _ Data As MSComctlLib.DataObject, _ AllowedEffects As Long) Data.Clear If Not Me.SmartTreeView.SelectedItem Is Nothing Then Data.SetData Me.SmartTreeView.SelectedItem.Key,vbCFText End If End Sub |
Private Sub SmartTreeView_OLEDragOver _ (Data As MSComctlLib.DataObject, Effect As Long, _ Button As Integer, Shift As Integer, x As Single, _ y As Single, State As Integer) With SmartTreeView If State = vbLeave Then Set .DropHighlight = Nothing Else .DropHighlight = .HitTest(x, y) End If End With mfX = x mfY = y If y > 0 And y < 100 Then m_iScrollDir = -1 Timer1.Enabled = True ElseIf y > (SmartTreeView.Height - 200) And _ y < SmartTreeView.Height Then m_iScrollDir = 1 Timer1.Enabled = True Else Timer1.Enabled = False End If End Sub |
Private Sub SmartTreeView_OLEDragDrop( _ Data As MSComctlLib.DataObject, Effect As Long, _ Button As Integer, Shift As Integer, x As Single, _ y As Single) Dim strKey As String Dim thisNode, DragNode As Node Set oNode = Me.SmartTreeView.HitTest(x, y) If Data.GetFormat(vbCFText) Then strKey = Data.GetData(vbCFText) Set oDragNode = SmartTreeView.Nodes(strKey) On Error Resume Next Set oDragNode.Parent = oNode If Err.Number = 35614 Then MsgBox "节点不能移动到此位置:不能创建循环引用关系。" On Error GoTo 0 End If Set SmartTreeView.DropHighlight = Nothing End If End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者