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
145
UltraGroupBox.AutoSize
posted

Hello,

Does UltraGroupBox support auto-sizing in any fashion, and if yes, then how to enable it?

If not, then why, and what should I do (short of replacing it by WinForms GroupBox)?

Also, I've seen some discussion about UltraExpandableGroupBox not supporting AutoSize - is it a systematic design decision throughout NetAdvantage controls?

Thanks a lot,

Andris

  • 37774
    Verified Answer
    posted

    Andris,

    There certainly isn't a systematic decision through the NA controls to not support AutoSize, since some control do in fact support it.  In the case of container controls, such as the various groupboxes, I think that a good part of the reason is that the layout manager that other container controls use (i.e. the inbox Panel) are internal to the Microsoft framework, so we would have to re-engineer the autosize logic ourselves from scratch; this is more complicated because there are a host of issues to deal with, such as anchoring, docking, etc.  The reason that the AutoSize property is there is because it exists on the .NET Control class as of the framework version 2.0.

    You might be able to hack around this by getting the PreferredSize of the various child controls and summing those together with the various locations of each control in order to get a better idea of how large your groupbox needs to be.

    -Matt