Hello,
We are using UltraWinExplorerBar.UltraExplorerBar. And we have to hide the customize button at the bottom of explorer. We have used the below code to hide the customize button.
UltraExplorerBar1.NavigationOverflowButtonAreaVisible = False
Now when we click on the some areas at the bottom of explorer its giving the following exception.
ActiveGroup cannot be set - specified Group cannot be activated! (Group may be disabled or its header may not be visible)
System.ArgumentException was unhandled Message="ActiveGroup cannot be set - specified Group cannot be activated! (Group may be disabled or its header may not be visible)" Source="Infragistics2.Win.UltraWinExplorerBar.v10.3" StackTrace: at Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar.set_ActiveGroup(UltraExplorerBarGroup value) at Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroupHeaderUIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement) at Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(Object sender, MouseEventArgs e) at Infragistics.Win.ControlUIElementBase.ProcessMouseDown(Object sender, MouseEventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraControlBase.OnMouseDown(MouseEventArgs e) at Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at UltraExplorerBarError.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
We tried various events to handle the exception, but could not trace any event to handle the exception.
Please suggest a solution to handle this exception.
With that property set doesn't the whole bottom area go away and there is no way for the user to activate that group now? Where are you clicking? Are you activating the group through code? Can you post a screenshot that accompanies this exception and show where you clicked?
I'm unable to insert the screen shot here. Below is the link of the file showing the area where i'm clicking and the error.
https://www.box.com/s/8zhw502nojr1288me8bm
Hi Randall,
Looking back the original bug that was being discussed in this thread previously, it was fixed in 10.3 and later since that was the latest version supporting maintenance at the time. Looking at the source code for the setter of this property if you are getting this exception that means the group you are passing in is not activateable. Add a check for group.IsActivateable and if it is then follow through with changing the active group.
The powers that be have said that upgrading to the latest version is not an option at this time. Also, with the version I have, there is no IsActivateable property that I can check. Leaving out the group.Active = true will still render the screen but will look "inactive" until clicked on. Other than that it functions just fine. This doesn't happen every time, just under certain conditions. I think once we get done with our big release I can push for an upgrade again.
Thanks
Well that would be because it is Internal :(... sorry I didn't realize that at the time.
What is the value of the UltraExplorerBar.Style property for the explorer bar you are using here? If you are not using OutlookNavigationPaneStyle you just need to check if the Group.Enabled and Explorerbar.Enabled are true and the Group.SettingsResolved.HeaderVisible is true. If you are using OutlookNavigationPaneStyle it gets a little more involved since several other internal properties are checked in that case... is reflection on the internal IsActivateable property an option :)... just had to throw that out there... but of course I'd rather find another option for you...
Fix one thing break another. So it goes. The workaround I tried broke other code so that wasn't really an option so I'm back to square one.
The Style property is OutlookNavigationPane so I'm back to more complicated part. Guess I'll have to keep digging at it.
Just out of curiosity do you happen to have access to the UltraExplorerBar source for your 9.2 version?
If using reflection to get the value of the internal IsActivateable property isn't an option but you have access to the source code you can implement the fix yourself (I'll show you the changes we made for the fix) and then rebuild the source and use those assemblies in your project. You can even just change the scope on the IsActivateable property if that's all you wanted to add to your code instead of the fix we did for later versions... you have more options if you are willing to build the source yourself but I do not remember how the source code access went during that timeframe but if you check your account for downloads available for your 9.2 key you would see the source code as an option if it is available.