Menu

Get Bounds

2013-12-19
2014-04-07
  • Kris Bennett

    Kris Bennett - 2013-12-19

    I can't seem to find any way to get the bounds of a control knowing the node... GetNodeControlInfoAt exists to work out the control bounds from a given point

    Surely there is some built in way to get the bounds from a TreeNodeAdv and a NodeControl.

    Am I missing something?

    Thanks,
    Kris

     
  • Jonatan

    Jonatan - 2014-04-04

    If you do not mind messing with the source code of the TreeViewAdv, then there is a simple solution.

    Find the TreeViewAdv.cs document and change the GetNodeControls(TreeNodeAdv node) Method.
    Simply make it public instead of internal, then set the project version up by 1 in the AssemblyInfo.cs doc, build the solution and reimport it in your main project.

    The GetNodeControls method fetches a list of all NodeControlInfos for the specific TreeNodeAdv. This has turned out very helpful for me in regards to implementation of improved drag'n'drop functionality.

     
  • Kris Bennett

    Kris Bennett - 2014-04-07

    Ok... one issue now ... when the control is scrolled down and I get the bounds + ColumnHeaderHeight (which I also made public) it still thinks that the item that I am getting the bounds of is relative to the TOP item ... not the scroll position ... any further details on how I could correct this?

    Thanks,
    Kris

     

Log in to post a comment.