How do I change the specific position of a group or move it up and down among other groups at run-time? I thought of changing the index but it's ready-only. I have OutlookNavigationPane as View Style.
For those of you that are using an older version (I'm using 7.3), you can do this to "reposition" groups with controls in them...
this.explorerBar.Groups.All = new object[0];
// add the new array of repositioned groups here
this.explorerBar.Groups.AddRange(new UltraExplorerBarGroup[ { ..., ..., ..., ...});
this wont destroy the controls in the groups
Thanks,
Andrew
Great.. That did the trick..
We we're running v8.1 and the optional parameter wasn't in there.. But have now upgraded to v8.3 and everything is in order :)
Thanks for your help Brian.
In March 2008 an overload of the Groups collection's Remove method was added (to versions 8.1 and later) which allows the caller to specify whether to dispose of the container control. In your case you would specify false for this parameter. Note that the method should be used with caution as you don't want to forego disposal unless you know that the group is still going to be used.
Hi,
I have come accross this same issue, and the removal and re-adding works great..
Only problem is if the Group is a ControlContainer, then the when the group is removed from the explorer bar, all of the controls within it are removed and disposed of :|
Does anyone know if a request has been made all to simply set the index of a group to achieve this?
Thank You! Yes, I had the same solution where i had to put my groups in an array and myBar.Groups.AddRange(myarray).