Working with Multiple CommandBar Objects |
Post Reply |
Author | |
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
Posted: 02 March 2004 at 3:56pm |
I've seen several posts throughout the forums where people have had issues using more than one CommandBars object in the same application. Two very common scenarios for using multiple CommandBars objects are:
The main reason for using mutiple CommandBars objects is that the CommandBars object can only control toolbars on the form it is contained within (I believe this is an ActiveX limitation only, but I could be wrong). That's the reason that MDI Child forms and DockingPanes have to have their own CommandBars object. A well-noted issue is that the KeyBindings are only executed for the main CommandBars object. Any KeyBindings on other forms are ignored. Another big issue seems to be with Customizing toolbars. The ablity to customize toolbars and menus was a big selling point for the CommandBars control. This ablity to customize, however, becomes a nightmare when the same control needs to be displayed on more than one CommandBars object (i.e. have 'Cut' in the 'Edit' menu of the main form but also as a toolbar control on a DockingPane). Even though the two controls have the same ID, any customization made the control on the main CommandBars menu is not replicated to the same control on the DockingPane. This means that Captions, Images, KeyBindings, etc are now "out of sync". Without the ablity to keep the items in sync, it's not feasible to allow customization when you also need to have multiple CommandBars objects. So what's the solution? I don't know. I'm hoping Codejock has the answer. A solution to the Customization problem could possibly be resolved in two ways.
A possible solution for the KeyBindings problem might be:
If anyone else has noticed problems using the more than one CommandBars object in the same project, please post them here. Hopefully Codejock will be able to provide some feedback with workarounds or implement a solution in a future build of the controls. Of course, the best solution would be to have a single CommandBars object that allows you to create a CommandBar on ANY form (including the ability to dock/undock toolbars between multiple forms) . I look forward to your feedback. |
|
Bjarne
Newbie Joined: 30 December 2003 Location: Denmark Status: Offline Points: 28 |
Post Options
Thanks(0)
|
Hello Boyd, I have not much to add to what you already so nicely have said in your comment. So I can only say that I have the same challenges as you express above and would really like a guidence on how to work around it for now, and a fix for the medium and longer term. Bjarne |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
Bjarne, I wanted to let you know that several improvements in the next release have helped with the problems I previously described.
It's still not a perfect solution, but the new features are a big improvement. I'd still like to see a single Command Bar that can dock/undock between different Command Bar hosts. |
|
Bjarne
Newbie Joined: 30 December 2003 Location: Denmark Status: Offline Points: 28 |
Post Options
Thanks(0)
|
Thanks Boyd,
Really looking forward to trying it out. But if I understand you correct there is not really a workaround for having more than one CommandBar on a Form and using Keyboard Shortcuts? Anyway, I will have to work around this then in the design of the forms. Is the April 5th, the realese date for the next version? Bjarne |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Yes, v8.70 will be available on 4/5/04.
|
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
Correct. There is still no official fix for shortcuts being recognized on any CommandBar other than the main one. |
|
svenn
Newbie Joined: 07 May 2004 Location: Norway Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Are there any news on shortcuts and multiple CommandbBar objects?
.svenn |
|
svenn
Newbie Joined: 07 May 2004 Location: Norway Status: Offline Points: 12 |
Post Options
Thanks(0)
|
It is a bit strange that no action has been taken upon this issue.
Searching the forums I find several topics related to the same issue. Obviously several are experiencing the same problems with shortcut keys. Codejock engineers, could you please look at how we can resolve problems with shortcut keys and multiple commandbars? .svenn |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Please attach sample that illustatrates problem
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
svenn
Newbie Joined: 07 May 2004 Location: Norway Status: Offline Points: 12 |
Post Options
Thanks(0)
|
The attached sample illustrates the problem.
The main toolbar at the bottom does not respond to accelerator keys when my utility toolbar on the top right is displayed. In my production code these toolbars reside in different components (DLLs) and can not be placed on the same container (form, user control or picture box). Is there any way I can force one of these to take precedence in handling shortcut keys, or better yet, have both properly respond to shortcuts? .svenn2005-11-29_091826_Commandbar_Sample.zip |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Thank you for sample, we changed behaviour for 9.81 release. In 9.81 will both properly respond to shortcuts. (but only one if same shortcut used) Thanks.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
svenn
Newbie Joined: 07 May 2004 Location: Norway Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Oleg,
That is great news, and saves me a lot of hassle. When will 9.81 be availe for download? Svenn |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |