![]() |
CommandBars.Actions don't work with Ribbon |
Post Reply ![]() |
Author | |
dimdar ![]() Groupie ![]() ![]() Joined: 11 July 2007 Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() Posted: 12 July 2010 at 5:26am |
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?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Thanks a lot. we agree problem with Popups that was created with CreateCommandBar method. It fixed for next release. Please as workaround manually connect control with its action: Set Control = .Controls.Add(xtpControlButton, 555, "") Set Control.Action = CommandBars.Actions.Action(555) |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
dimdar ![]() Groupie ![]() ![]() Joined: 11 July 2007 Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() |
Thank you! |
|
![]() |
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 |