Hi,I have listview inside of UltraExpandableGroupBox.I want to make the control larger or smaller when listview item is added or removed.I found that UltraExpandableGroupBox has Panel inside it and has AutoSize Property.I set the AutoSize to true, and also make another property grow and sink.However, the UltraExpandableGroupBox size doesn't change at all,Is there any other options that I need to set ?How to achieve this ?
Thanks
Hello Mario,
The 'AutoSize' property of the UltraExpandableGroupBox control is hidden in the Intellisense and the Property Grid in the designer but still can be set to 'true', by adding the following line inside your code: this.ultraExpandableGroupBox1.AutoSize = true;
Please let me know if you need further assistance.
Regards,Ivan Kitanov
Hi Ivan,thanks for your answer.I have tried it, but the behaviour is quite strange and not as I expected.
If that property is hidden, it's probably hidden for a good reason. And I am almost certain it's not going to work the way you want it to. The Panel control is managed by the UltraExpandableGroupBox, so you really should almost never be setting properties on that panel directly. I feel confident that setting AutoSize to try on the panel is not going to do what you want, and it may cause problems. So I strongly advise against doing that.
If you want an expandable window to wrap a single control, you might want to consider using UltraDockManager, instead. That will give you a dockable, pinnable window like Visual Studio has, and it will size to the control - at least in one dimension.
If you want to size the UltraExpandableGroupBox to a control, then you can achieve this by simply setting the ClientSize property. I have attached a quick, simple sample here.
WindowsFormsApp15.zip