editor window will not allow snippet

Feb 1, 2012 at 1:02 PM
Edited Feb 1, 2012 at 1:04 PM

hi all,

i have been trying to extend a toolbox library to get drop and drag code snippets from the toolbox to the editor window... but im seeing that the editor window will only allow a text drop and drag? i have create a property in the toolbox libray like so...

 Private msnippet As ScintillaNet.Snippet

Public Property codesnippet() As ScintillaNet.Snippet
                    Return Me.msnippet
                End Get
                Set(ByVal value As ScintillaNet.Snippet)
                    Me.msnippet = value
                End Set
            End Property
and then i create like...
 Dim newitem As New VS2005ToolBox.ToolBox.VSTreeNode
        newitem.Text = "MASFile"
        newitem.ToolTipCaption = newitem.Text
        newitem.ToolTipText = "This is the MASFile snippet"
        newitem.codesnippet = New ScintillaNet.Snippet("instance", "instance=$name$ " + vbCrLf + _
       "{" + vbCrLf + "	$end$$selected$" + vbCrLf + "}")

and use..

  DoDragDrop(CType(e.Item, VS2005ToolBox.ToolBox.VSTreeNode).codesnippet, DragDropEffects.Copy)
but the editor will not allow this to happen as the item is a code snippet NOT a string
is there any other way round this?
PS: IF we can work this out i will share the code