Auto resize Window according to AccordionView size/state?



  • Hi Frederik,

    This is probably easy but I can’t seem to find it: Is there a way to automatically resize a Window (or FloatingWindow) to contain an entire AccordionView? So when an item in the AccordionView is collapsed, instead of having grey background on the bottom of the Window the Window would automatically shrink to its new smaller size; and conversely when an item in the AccordionView is unfolded, the Window would get bigger (taller)?

    Thanks,
    Nina



  • Hmm, thank you. At least now I know what event I’m looking for :)


  • admin

    mmm

    this is not that easy :)

    it is possible, I would add an observer on NSViewFrameDidChangeNotification of the content view of the scrollview, an accordion view is actually a scrollview with some accordion powers

    hope this makes sense :)