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
479
UltraTree columnset header location
posted

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.

Parents
  • 69832
    Offline posted

    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.

Reply Children
No Data