Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Full width columns / indentation / AutoFitColumns
posted

3 unrelated questions re the WinTree -

 1. My root nodes consist of a single value (the child nodes are a grid). Is it possible to have the root node fill the width of the WinTree control so they look more like 'separators' rather than branches?

2. I would like to set the child nodes to appear immediately below the root nodes (so the first column is directly below the label on the root node and only indented by the same amount as the root node - ie just to the right of the expansion indicator) - however I can't seem to be able to set Indent to less than 15 - is there a way to override this and set it to 0, for example?

3. It doesn't seem to matter what I do - I cannot get the columns in the child nodes to auto-size to fill the width of the control. I am creating the root notes and runtime, and the binding a List<T> to each node to create the child node grids. However, the column seem to be some abitrary width despite tree.ColumnSettings.AutoFitcolumns = ResizeAllColumns . What am I missing?

 Thanks for your help

Mark

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Mark,

        1) I'm not sure if there is any easy way to do this. One thing you can try is setting FullRowSelect to true. That might work. If it does not, then I imagine you would need to use a CreationFilter, which would not be easy or simple. 

        2) I'm not sure I understand exactly what you want here. There is no way to set the Indent less than 15. However, the Indent property is not used if you change the DisplayStyle to WindowsVista (assuming you have a recent version of the tree). Instead, the indentation is determined by the ExpansionIndicatorSize and ExpansionIndicatorPadding. But since this is accounted for on each level, I suspect you will not be able to acheive what you want. 

        3) I'm not sure why this isn't working. The only thing I can think of is that the total width of your columns is wider than the tree to start with? If you size the columns such that they are bigger than the available area, then I think the AutoFitting might be overriden by this. You might want to try to set the width on each column and make it small enough so that all of the columns fit in the viewable area before setting AutoFitColumns. But I am only guessing here. 

Reply Children