anyone have a ribbon menu.xml -> 2003 CommandBar converter

J

\Ji Zhou [MSFT]\

Hello Dave,

Yes, I agree that this demand makes sense to some points, but the scenario
here is quite complicated. I have searched on the web, and did not find any
existed tool or codes to do so. I intend to help, but whether it is
achievable really depends on which controls and which properties and events
of the controls we are using in the Office 2007 ribbon?

Before going, we have to realize that the controls on ribbon cannot be
mapped to the command bar control in a one-to-one way. For example, we
cannot find the exact corresponding control in the command bar for the
SplitButton and Gallery in the ribbon. Even, we do have combobox in both of
the ribbon and the command bar. But their properties and events may behave
differently.

Take the combobox for example,

*In the Command bar mode, we can call the CommandBarComboBox.AddItem() to
add an item directly. But in the ribbon mode, we have to implement the
getItems callback and then call ribbon.Invalidate() to add or remove an
item dynamically.

*In the Command bar mode, we can set the CommandBarComboBox.Width to modify
the length of the comboBox control. But in the ribbon mode, we have to set
its sizeString attribute to placeholder string which reflects its width.

If we use any getXXX callbacks function in the ribbon, it will be very
difficult to create a tool which can convert the ribbon xml to command bar
codes automatically. There are too many things to be considered carefully
and the converted codes may have many places to adjust according to the
real requirement. So, my opinion it is not worth of writing codes for this
objective. It is a convoluted way. What do you think about it?


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

Hi;

Good points. What I'm going to try is reading in the ribbon xml and
using XPath to get each node based on it's ID, and then copy the text
across to my CommandBar menu items. I use the same menu ID
consistently across so that should work (I hope).

thank you for your feedback - that helped a lot on what not to do
(which saves me a lot of time).

thanks - dave


Hello Dave,

Yes, I agree that this demand makes sense to some points, but the scenario
here is quite complicated. I have searched on the web, and did not find any
existed tool or codes to do so. I intend to help, but whether it is
achievable really depends on which controls and which properties and events
of the controls we are using in the Office 2007 ribbon?

Before going, we have to realize that the controls on ribbon cannot be
mapped to the command bar control in a one-to-one way. For example, we
cannot find the exact corresponding control in the command bar for the
SplitButton and Gallery in the ribbon. Even, we do have combobox in both of
the ribbon and the command bar. But their properties and events may behave
differently.

Take the combobox for example,

*In the Command bar mode, we can call the CommandBarComboBox.AddItem() to
add an item directly. But in the ribbon mode, we have to implement the
getItems callback and then call ribbon.Invalidate() to add or remove an
item dynamically.

*In the Command bar mode, we can set the CommandBarComboBox.Width to modify
the length of the comboBox control. But in the ribbon mode, we have to set
its sizeString attribute to placeholder string which reflects its width.

If we use any getXXX callbacks function in the ribbon, it will be very
difficult to create a tool which can convert the ribbon xml to command bar
codes automatically. There are too many things to be considered carefully
and the converted codes may have many places to adjust according to the
real requirement. So, my opinion it is not worth of writing codes for this
objective. It is a convoluted way. What do you think about it?


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Chris Spicer

May I ask how you got on with this? I'm working on the reverse - a CommandBar to Ribbon XML converter -at the moment and would be interested in your findings.

Chris Spicer
Technicana - www.Technicana.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top