Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - RibbonSample-System Menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

RibbonSample-System Menu

 Post Reply Post Reply
Author
Message
mav50202 View Drop Down
Newbie
Newbie


Joined: 09 August 2005
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav50202 Quote  Post ReplyReply Direct Link To This Post Topic: RibbonSample-System Menu
    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.
 
 
 
 
Back to Top
mav50202 View Drop Down
Newbie
Newbie


Joined: 09 August 2005
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav50202 Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.033 seconds.