Print Page | Close Window

RibbonSample-System Menu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=6397
Printed Date: 19 June 2025 at 11:54am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RibbonSample-System Menu
Posted By: mav50202
Subject: RibbonSample-System Menu
Date Posted: 13 February 2007 at 4:46am
Hi again, im trying to do a sample like the ribbon sample in codejock downloads, and i have problems with the system menu, and i want to do some like this.
 
But I dont know to get the description and the icon in the "Print Preview Element" , i know that is a "CXTPRibbonControlSystemPopupBarListItem" but the description below and icon i dont know to set it.
 
And in the header "Preview and print the document", my background color is the same every time and in this sample is blue, how can i change?
 
And last, whats is the event in the main system menu when change the focus over print and send and change the elements in container.
 
Thank you very much for all and im so sorry this long topic.
 
 
 
 



Replies:
Posted By: mav50202
Date Posted: 13 February 2007 at 5:15am

I did it, with this code, i get it from the samples in VB. (I work in Visual Foxpro 9).

Thanks.

 

With ControlFile.CommandBar.Controls

.Add xtpControlButton, ID_FILE_NEW, "&New"

.Add xtpControlButton, ID_FILE_OPEN, "&Open..."

.Add xtpControlButton, ID_FILE_SAVE, "&Save"

.Add xtpControlButton, ID_FILE_SAVE_AS, "Save &As..."

Set Control = .Add(xtpControlSplitButtonPopup, ID_FILE_PRINT, "&Print")

Control.BeginGroup = True

Set PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage")

Set Control.CommandBar = PopupBar

Set Control = PopupBar.Controls.Add(xtpControlLabel, 0, "Preview and print the document")

Control.Width = 296

Control.DefaultItem = True

Control.Style = xtpButtonCaption

PopupBar.DefaultButtonStyle = xtpButtonCaptionAndDescription

PopupBar.SetIconSize 32, 32

PopupBar.ShowGripper = False

PopupBar.Controls.Add xtpControlButton, ID_FILE_PRINT, "Print Pre&view"

PopupBar.Controls.Add xtpControlButton, ID_FILE_PRINT_SETUP, "Pr&int Setup..."

PopupBar.Controls.Add xtpControlButton, ID_FILE_PRINT_PREVIEW, "Print Pre&view"

.Add xtpControlButton, ID_FILE_PREPARE, "Prepare"

.Add xtpControlButton, ID_FILE_SEND, "Send"

.Add xtpControlButton, ID_FILE_PREPARE, "Publish"

.Add xtpControlButton, ID_FILE_CLOSE, "Close"

Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarListCaption")

Control.Caption = "Recent Documents"

Control.BeginGroup = True

.AddControl Control

Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarListItem")

Control.Caption = "frmMain.frm"

.AddControl Control

Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarButton")

Control.Caption = "Options"

Control.Id = ID_FILE_OPTIONS

.AddControl Control

Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarButton")

Control.Caption = "Exit Sample"

Control.Id = ID_APP_EXIT

.AddControl Control

ControlFile.CommandBar.SetIconSize 32, 32

End With




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net