I’ve just finished creating the new samples for the upcoming Version 3 of Krypton and wanted to show a picture. One of the scenarios I imagine being quite common is dragging and dropping from a TreeView into a Navigator or Workspace instance. So I created a sample that implements just that.

The sample contains a TreeView derived class that has been customized to recognize the user starting to drag a node and then hooks into the Krypton page dragging functionality. So you just need to create a DragManager instance and attach it to the PageDragNotify property of the new control and your ready to roll.

Hook up your Navigator/Workspace instances to the same DragManager and they all work nicely together. The sample also allows you to drag from the Navigator and drop it on the TreeView so the page becomes part of the tree again.

You can apply the same technique to any control and so easily integrate your own list control, button or custom control into the page dragging of Krypton. Just look at the code in the sample and apply it to your favorite control and your up and running.

9 Responses to “TreeView Drag Drop”

  1. DavidS Says:

    Hi Chris,

    This is a cool feature which I’ll use, another two features I’ll be looking out for are the close button on the tab itself and if you have a look at the new Google Chrome, just play with the tabs drag and drop, that is fantastic, see the way you can drag the tab out of the window, and when you reorder them how dynamic the reordering is, its super cool.

    Just a thought.

  2. DavidS Says:

    My apologies, for some reason I called you Chris, I meant Phil. Whoops, sorry

  3. Judah Says:

    Looking great as usual, Phil.

    David, if you haven’t already, check out the thread in the Krypton Forums about making a Google Chrome-like Krypton Navigator:

    http://www.componentfactory.com/forums/viewtopic.php?f=5&t=1491

  4. Chris Says:

    Very nice Phil. I can’t wait to see the workspace in action. Are you planning time to do some new screencasts?

  5. Anonymous Says:

    Regarding individual close buttons on tabs, I would like to see a buttonspec collection for each tab, and also a shared buttonspecs collection on the navigator itself for buttonspecs that would be shared by all tabs.

    Then you would just add a single close buttonspec to the shared collection and then each tab will have its own close button.

  6. Judah Says:

    I just wanted to chime in and say, button specs on the tabs would be huge for us. As a KryptonNavigator owner, I’d vote for that as my top feature.

  7. Phil Wright Says:

    ButtonSpecs for individual tabs is in the feature list but will not appear in the next release.

  8. Chris Says:

    Any estimate on the release date of the new version? Look forward to trying the new numericUpDown control in my project.

  9. Phil Wright Says:

    Beta in about a week.

Leave a Reply