I have an UltraTree in FreeForm.
I have a TreeNode, of which I have attached a picture.
The yellow cell displays the cell value, and the pink cells display column names.
I want to make the pink cells all the same size, and not dependent on the size of the yellow cell.
This is the code I do to generate the node:
colSet is an UltraTreeColumnSet
//For the yellow cell:
colSet.Columns[j].LayoutInfo.LabelPosition =
NodeLayoutLabelPosition.None;
colSet.Columns[j].LayoutInfo.OriginY = 0;
colSet.Columns[j].LayoutInfo.OriginX = 0;
//For the pink cells:
NodeLayoutLabelPosition.LabelOnly;
//colSet.Columns[j].LayoutInfo.LabelPosition = NodeLayoutLabelPosition.None;
//For each pink cell, set Y and X
for (int i = 1; i < colSet.Columns.Count; i++){
colSet.Columns[i].LayoutInfo.OriginY = 2;
colSet.Columns[i].LayoutInfo.OriginX = (i - 1);
}
//Each pink column should span 1 cell
colSet.Columns[j].LayoutInfo.SpanX = 1;
colSet.Columns[j].LayoutInfo.SpanY = 2;
I tried using the Preferred cell size for each pink cell.
colSet.Columns[j].LayoutInfo.PreferredCellSize = new Size(20, 2);
but it doesn't seem to do anything.
Instead of colSet.Columns[j].LayoutInfo.PreferredCellSize try with colSet.Columns[j].LayoutInfo.PreferredLabelSize