![]() |
RibbonSample-System Menu |
Post Reply ![]() |
Author | |
mav50202 ![]() Newbie ![]() Joined: 09 August 2005 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() 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.
![]() |
|
![]() |
|
mav50202 ![]() Newbie ![]() Joined: 09 August 2005 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() |
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 = TrueControl.Style = xtpButtonCaption PopupBar.DefaultButtonStyle = xtpButtonCaptionAndDescription PopupBar.SetIconSize 32, 32 PopupBar.ShowGripper = FalsePopupBar.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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |