Hi,
I have this problem with Actions and Ribbon see below:
CommandBars.DeleteAll CommandBars.Options.SetIconSize True, 24, 24 CommandBars.Options.SetPopupIconSize 24, 24 CommandBars.Options.LargeIcons = True CommandBars.Options.ShowExpandButtonAlways = False ' Action CommandBars.EnableActions CommandBars.Actions.Add 555, "555", "", "", "File" 'Action ID is 555 Dim RibbonBar As RibbonBar Set RibbonBar = CommandBars.AddRibbonBar("The Ribbon") RibbonBar.EnableDocking xtpFlagStretched Dim ControlFile As CommandBarPopup
Dim PopupBar As CommandBar Set ControlFile = RibbonBar.AddSystemButton() ControlFile.IconId = tid_System_Icon ControlFile.Caption = "&File" With ControlFile.CommandBar .Controls.Add xtpControlButton, 444, "Button1" .Controls.Add xtpControlButton, 555, "" Dim ControlPrint As CommandBarPopup Set ControlPrint = AddButton(.Controls, xtpControlSplitButtonPopup, tid_File_Stampa) With ControlPrint .BeginGroup = True Set PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage") Set ControlPrint.CommandBar = PopupBar With PopupBar .SetIconSize 24, 24 .ShowGripper = False .DefaultButtonStyle = xtpButtonCaptionAndDescription
With AddButton(.Controls, xtpControlLabel, 0) .Caption = "Preview and print the document" .Width = 296 .DefaultItem = True .Style = xtpButtonCaption End With .Controls.Add xtpControlButton, 555, "555 lost caption" 'I need specify a caption otherwise is empty End With End With .Controls.Add xtpControlButton, 555, "" .Controls.Add xtpControlButton, 666, "Exit" End With
CommandBars.Actions.Action(555).Checked = True 'Check all 555 Command ID
The button with "555 lost caption" is not the same of actions and infact is not checked, I have missing something?
|