BCGControlBar教程之Ribbon Backstage视图(二)

为了在应用程序中启用Backstage视图,您可以执行以下步骤。以下的指南假设Ribbon控件被定义为m_wndRibbonBar,应用程序按钮上显示的文本是"File",命令图片以图片列表的形式展示,视图项拥有一个资源ID IDB_FILESMALL。下面提到的图像索引假设您已经获得下面的图像列表:

Ribbon Backstage视图

1. 使用Application Wizard或一个现有的基于Ribbon的应用程序生成一个基于Ribbon的应用程序。

2. 为您的应用程序启用Backstage视图,对于某些可视化管理器,您可以使其适用于所有状况。最佳位置是OnAppLook处理器,您可以调用m_wndRibbonBar.SetBackstageMode (bCondition);

3. 您可以使用以下代码设置应用程序按钮颜色:

1
2
COLORREF clr = RGB(0, 0, 192);
CBCGPVisualManager::GetInstance()->;SetMainButtonColor (clr);

如果您想开发一个套包,那么可以通过应用程序按钮的颜色来区分每个应用程序。

4. 找到您初始化应用程序菜单的位置(主目录)。

5. 如果您想使用Backstage视图替换应用程序菜单,那么可以删除Application Button/Application Menu的所有颜色。

6. 如果您想Backstage视图显示仅适用于可视化管理器(基于其他条件),在主目录初始化之后新增Backstage视图的初始化。

7. 新增Backstage视图到Ribbon Bar中:

1
CBCGPRibbonBackstageViewPanel* pBackstagePanel = m_wndRibbonBar.AddBackstageCategory(_T( "File" ), IDB_RIBBON_FILESMALL);

该方法返回一个指针到CBCGPRibbonBackstageViewPanel,它代表Backstage视图用于后续调用,这将增加命令并查看条目。

8. 使用步骤7中获得的指针添加如下命令:

1
2
3
4
5
pBackstagePanel->AddCommand (ID_FILE_SAVE, _T( "Save" ), 2  /* Image index */ );
pBackstagePanel->Command (ID_FILE_SAVE_AS, _T( "Save As" ), 3  /* Image index */ );
pBackstagePanel->AddCommand (ID_FILE_NEW, _T( "New" ), 0  /* Image index */ );
pBackstagePanel->AddCommand (ID_FILE_OPEN, _T( "Open" ), 1  /* Image index */ );
pBackstagePanel->AddCommand (ID_FILE_CLOSE, _T( "Close" ), 4  /* Image index */ );

当第6步完成之后,您的Backstage视图使用步骤5中的保存,另存为,新建,打开和关闭进行初始化,同时显示来自IDB_FILESMALL图像列表中的图像位于索引2,3,0,1和4。

9. 现在您可以编译应用程序,打开Backstage视图,看到左侧的五个命令:

Ribbon Backstage视图

10. 现在添加一个基于子对话框的视图,这将显示MRU文件列表。

有兴趣的朋友可以击查看更多BCG资源>>

================================== ==注意:一共2个压缩包,这是第1个== ================================== *提示:无自动安装程序,包含所有源码、例子、帮助,请按照安装顺序安装!!! DevExpress VCL v2012 vol 2.6 包含所有源码、例子、帮助 如果你安装过其它版本的DevExpressVCL,安装前请完全卸载老版本的Dev控件,并执行“清理Dev残余文件”,清理System32下的DevExpress的BPL文件。 What's New in DevExpress VCL 12.2.6 Release Notes Feature Highlights To learn about feature highlights in this version, please refer to the following page: New Features - DevExpress VCL 12.2.6 Known Issues To learn about known issues in this version, please refer to the following page: Known Issues - DevExpress VCL 12.2.6 The following sections list all minor and major changes in DevExpress VCL 12.2.6. Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ExpressQuantumTreeList Suite Q484199 - Documentation - Provide an example of how to use the TcxCustomTreeList.Find function Resolved Issues VCL Subscription B232998 - Documentation - The OnValidateDrawValue event is not described ExpressBars Suite Q492229 - Activating an MDI child window always repaints it, regardless of the bar manager's AlwaysMerge property value Q490246 - Changing a bar item's Visible property when a form is being destroyed results in an AV Q489146 - Ribbon - A Ribbon tab group's Caption property does not apply to the group caption if this group is displayed in a popup window Q489457 - Ribbon - TdxRibbonBackstageView - In RAD Studio XE or later, an AV occurs when changing the parent of a currently hidden form with the BackstageView after the form Position property has been set to poDesigned and the toolbar on this form made visible Q486834 - Ribbon - TdxRibbonBackstageView - Invoking the BackstageView does not move focus to it from the currently focused control that resides on a form with this BackstageView B233045 - Ribbon - TdxRibbonBackstageView - Right-clicking an empty spa
================================== ==注意:一共2个压缩包,这是第1个== ================================== *提示:无自动安装程序,包含所有源码、例子、帮助,请按照安装顺序安装!!! New Features in 13.1.4 (VCL Product Line) Breaking Changes To learn about breaking changes in this version, please refer to the following page: Breaking Changes in 13.1.4 (VCL Product Line) Known Issues To learn about known issues in this version, please refer to the following page: Known Issues in 13.1.4 (VCL Product Line) The following sections list all minor and major changes in DevExpress VCL 13.1.4. Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. Enhancements and Updates New Features/Updates VCL Subscription ExpressTile Control ExpressDataController Resolved Issues ExpressBars Suite ExpressLayout Control ExpressNavBar ExpressPageControl ExpressPivotGrid Suite ExpressPrinting System ExpressQuantumGrid Suite ExpressQuantumTreeList Suite ExpressScheduler Suite ExpressSkins Library ExpressSpreadSheet ExpressTile Control ExpressVerticalGrid Suite ExpressDataController ExpressEditors Library ExpressLibrary Installation (VCL) New Features/Updates VCL Subscription S170932 - Documentation - Describe that the ExpressLayout Control and ExpressDocking Library are incompatible ExpressTile Control S172299 - Center the Back button and title text vertically within the title Common Libraries ExpressDataController S172107 - Add the capability to disable multi-threaded operations at the level of custom data sources (TcxCustomDataSource descendants) Resolved Issues ExpressBars Suite Q476901 - Documentation - The "Ribbon Application Menu" topic does not contain the menu creation steps that are specific to TdxRibbonBackstageView Q452658 - Documentation - The TdxCustomRibbonGalleryItem.GalleryGroups property is not marked as deprecated and is used in topics instead of TdxCustomRibbonGalleryItem.GalleryCategories Q513198 -
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值