Hi, is there any way I can get the location and size of a header of the RootColumnSet of an ultra tree?
I have a column to which I would like to align a combo box just above it, so I need the size and location of the column header.
Hi Brian,
Thanks for the reply.
However, the ColumnHeaderAreaUIElement interface does not have a Column property to identify which column I'm looking at (I've got two columns and two combo boxes to align to them).
I've tried to find similar properties between the Column and the UIElement for the header area, but can't find any.
Please advise :-)
SabbeRubbish
I think the easiest thing to do would be to implement IUIElementCreationFilter, and in the AfterCreateChildElements method, handle the case where the parent is a ColumnHeaderUIElement. Upcast the parent to that type and you can then access the Column property so you know which column you are dealing with. The UIElement class (from which ColumnHeaderUIElement derives) exposes a Rect property, the Location of which is relative to the control's top left corner. Don't forget to convert that to screen coordinates and then back to the form's client coordinates.