Re-creating toolbar arrangement

The user can arrange the toolbars any way they like. You may want your application to remember the user’s toolbar arrangement, and then re-create that arrangement when the application is used again. To do this, use the CommandBar_GetPosition() function.

Keep track of the toolbars (command lists) that the user has displayed. Use the CommandBar_GetPosition() function to retrieve the sequence and row for each toolbar, and save these values in a table or some other permanent storage. Typically this is done when the application is shut down.

To re-create the toolbar arrangement, use the CommandBar_Create() function to add the toolbars in the order indicated by the sequence values you saved. Be sure to use the corresponding row value you saved for each toolbar. The toolbars will appear in the same order the user had specified.


Documentation Feedback