How to set ActiveItem programatically. When I'm trying explorerBar.ActiveItem = explorerBar.ActiveGroup.Items[0] it throws an ArgumentException with message ActiveItem cannot be set - specified Item cannot be activated! (Item may be disabled or have a style that is not activatable like Separator or Label).
Style which is used for this instance is VisualStudio2005Toolbox.
Hello PoKrec,
I believe that this exception is telling you that the style of the item is a Separator or a Label, it is not about the style of the control.
So I tried this and it always works fine for me so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.
I found solution of this problem. I move this instruction to OnLoad method and it starts working.