Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - System Button Popup: Possible Now or Later?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

System Button Popup: Possible Now or Later?

 Post Reply Post Reply
Author
Message
apuhjee View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 September 2005
Location: United States
Status: Offline
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote apuhjee Quote  Post ReplyReply Direct Link To This Post Topic: System Button Popup: Possible Now or Later?
    Posted: 14 June 2007 at 1:52pm
Back to Top
apuhjee View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 September 2005
Location: United States
Status: Offline
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote apuhjee Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2007 at 2:08pm
Nevermind.  It appears that you forgot to include this in the C# sample.
 
Codejock:  Could you please post the C# code necessary to perform the same functionality as the VB sample?  Thanks.
 
jp
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 4:26pm
Hi Jason, this should be enought to get you started:

            XtremeCommandBars.RibbonBar RibbonBar = null;
            RibbonBar = CommandBars.AddRibbonBar("The Ribbon");
            RibbonBar.EnableDocking(XtremeCommandBars.XTPToolBarFlags.xtpFlagStretched);

            XtremeCommandBars.CommandBarPopup ControlFile = null;
            XtremeCommandBars.CommandBarPopup ControlTheme = null;
            XtremeCommandBars.CommandBarControl ControlAbout = null;
            XtremeCommandBars.CommandBar PopupBar = null;

            ControlFile = RibbonBar.AddSystemButton();
            ControlFile.IconId = ID.ID_SYSTEM_ICON;
            ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_NEW, "&New", false, false);
            ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_OPEN, "&Open...", false, false);
            ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_SAVE, "&Save", false, false);
            ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_SAVE_AS, "Save &As...", false, false);
            ControlPopup = (XtremeCommandBars.CommandBarPopup)ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlSplitButtonPopup, ID.ID_FILE_PRINT, "&Print", false, false);
            ControlPopup.BeginGroup = true;

            PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage");
            ControlPopup.CommandBar = PopupBar;
            Control = PopupBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlLabel, 0, "Preview and print the document", false, false);
            Control.Width = 296;
            Control.DefaultItem = true;
            Control.Style = XtremeCommandBars.XTPButtonStyle.xtpButtonCaption;
            PopupBar.DefaultButtonStyle = XtremeCommandBars.XTPButtonStyle.xtpButtonCaptionAndDescription;
            PopupBar.SetIconSize(32, 32);
            PopupBar.ShowGripper = false;
            PopupBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PRINT, "Print Pre&view", false, false);
            PopupBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PRINT_SETUP, "Pr&int Setup...", false, false);
            PopupBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PRINT_PREVIEW, "Print Pre&view", false, false);
            ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PREPARE, "Prepare", false, false);
            ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_SEND, "Send", false, false);
            ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PREPARE, "Publish", false, false);
            ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_CLOSE, "Close", false, false);
            Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarListCaption");
            Control.Caption = "Recent Documents";
            Control.BeginGroup = true;
            ControlFile.CommandBar.Controls.AddControl(Control, -1);


            Control = ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_MRU_FILE1, "Recent File", false, false); 

            Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarButton");
            Control.Caption = "Options";
            Control.Id = ID.ID_FILE_OPTIONS;
            ControlFile.CommandBar.Controls.AddControl(Control, -1);    

            Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarButton");
            Control.Caption = "Exit Sample";
            Control.Id = ID.ID_APP_EXIT;
            ControlFile.CommandBar.Controls.AddControl(Control, -1);

            ControlFile.CommandBar.SetIconSize(32, 32);
Back to Top
apuhjee View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 September 2005
Location: United States
Status: Offline
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote apuhjee Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 5:49pm
Thanks Mike. Worked perfectly.
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.031 seconds.