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.
In order to resize the UltraExpandableGroupBox, when the ListView is resized, what you can do is handling the SizeChanged event. Inside it you can set the ClientSize of the UltraExpandableGroupBox to be equal to the size of the ListBox as Mike suggested in his sample, similar to the code below:
private void UltraListView1_SizeChanged(object sender, EventArgs e)
{
UltraListView lv = sender as UltraListView;
this.ultraExpandableGroupBox1.ClientSize = lv.Size;
}
Please let me know if you have any questions.
Regards, Ivan Kitanov
Hi Ivan,
Thanks for your answer,but listview size doesn't change when I added new icon dynamically.ListView size seems fixed, because there is scrollbar on the listview,Can't figure out how to get the height size.