Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Defining toolbar on Ribbon Bar in XML
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Defining toolbar on Ribbon Bar in XML

 Post Reply Post Reply
Author
Message
JoeW View Drop Down
Newbie
Newbie
Avatar

Joined: 10 November 2008
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote JoeW Quote  Post ReplyReply Direct Link To This Post Topic: Defining toolbar on Ribbon Bar in XML
    Posted: 10 November 2008 at 11:56am
We have decided to try and define our ribbon bars with XML so that we can update the UI with just a change to the XML file, and also it would give the customer flexibility as well to change it.
 
What I want to do is have a "Font" section sort of like how MS Word or Excel does it.  So, it needs to be more of a toolbar layout in that particular Group.
 
Is there something I can define in the Group, ControlGroupOption, to make the buttons layout as a toolbar, i.e. left to right instead of vertically, 3-per column?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 1:12am
Him
 
Think its easy for you first create layout in code and then save it to XML file with DoPropExchange method.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JoeW View Drop Down
Newbie
Newbie
Avatar

Joined: 10 November 2008
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote JoeW Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 1:06pm
Should I be doing anything other than this?  Because it does not show anything useful.  I am using ver 1202.
 

XTP_COMMANDBARS_PROPEXCHANGE_PARAM param;

param.bSerializeControls = TRUE;

CXTPPropExchangeXMLNode px(FALSE, NULL, _T("Settings"));

CXTPPropExchangeSection pxCommandBars(px.GetSection(_T("CommandBars")));

GetCommandBars()->DoPropExchange(&pxCommandBars, &param);

px.SaveToFile("c:\\users\\joe\\testout.xml");

Back to Top
JoeW View Drop Down
Newbie
Newbie
Avatar

Joined: 10 November 2008
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote JoeW Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 3:24pm
I finally found the answer to my question by investigating the code.  The answer is to add the following attribute to the Group:
 

ControlsGrouping="1"

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.