Quick Access Toolbar

Support forum for ARG-Software Design Lab. Command Bars Library [http://www.arg.kirov.ru/]
Post Reply
rschummer
Posts: 10
Joined: Sat Jan 08, 2011 2:35 am

Quick Access Toolbar

Post by rschummer »

When a user customizes the Quick Access Toolbar the settings do not get saved to the Windows Registry or to a disk file. What are the recommendations or best practices for saving the settings/selections for a user?

Rick Schummer
AlexG
ARG-Software Design Lab.
Posts: 36
Joined: Sat Nov 14, 2009 5:14 pm

Re: Quick Access Toolbar

Post by AlexG »

Hi Rick,

You can use RestoreStateFromXml method of the CBM object to restore commandbars/ribbon state. And SaveStateToXmlFile method to save the current state (customizations). Please see frmRibbon sample form that comes with the library.

Or, as an alternative, you can use CustomUI features of the library. The RibbonXml property (or GetXml method) of the Ribbon returns the current XML represantion of the Ribbon. LoadCustomUI method of the Ribbon loads custom UI, or the Ribbon state.

BTW, you can get QAT-only XML representation:

Code: Select all

lcQatXml = "<customUI><ribbon>" + ThisForm.Ribbon.QuickAccessToolbar.GetXml() + "</ribbon></customUI>"
save result, and at the next startup load it from file (or other way you prefer) and pass to the LoadCustomUI method of the Ribbon.
With best regards,

Alex Grigorjev
(ARG-Software Design Lab.)
rschummer
Posts: 10
Joined: Sat Jan 08, 2011 2:35 am

Re: Quick Access Toolbar

Post by rschummer »

Thanks Alex, this looks pretty straight-forward. I really appreciate the response.

Rick Schummer
Post Reply