Print Page | Close Window

Adding More Sub Control Popup

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=23286
Printed Date: 13 May 2024 at 1:36pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding More Sub Control Popup
Posted By: Khaled Eissa
Subject: Adding More Sub Control Popup
Date Posted: 08 March 2017 at 11:24am
Hi all,

I'm trying to add sub Control Popup but can not add Control Button to it. it goes wrong to main Control Popup.
any help

What I want is like in these two images

two sub Control Popup 
I need to add Control Buttons to each one

here is my code

    Set ControlOptions = RibbonBar.Controls.Add(xtpControlPopup, 0, "Options")
    ControlOptions.Flags = xtpFlagRightAlign
    
    Dim Control2 As CommandBarControl
    
    Set Control = ControlOptions.CommandBar.Controls.Add(xtpControlPopup, 0, "Styles")
    Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLEBLUE2007, "Office 2007 Blue"
    Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLESILVER2007, "Office 2007 Silver"
    Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLEBLACK2007, "Office 2007 Black"
    Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_STYLEAQUA2007, "Office 2007 Aqua")
    Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_STYLEBLUE2010, "Office 2010 Blue")
    Control2.BeginGroup = True
    Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLESILVER2010, "Office 2010 Silver"
    Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_STYLEBLACK2010, "Office 2010 Black")
    Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_STYLESCENIC7, "Windows 7 Scenic")
    Control2.BeginGroup = True
    
    
    
    Dim Control3 As CommandBarControl
    Dim Control4 As CommandBarControl
 
    
     Set Control3 = ControlOptions.CommandBar.Controls.Add(xtpControlPopup, 0, "Skins")
     
     Control3.CommandBar.Controls.Add xtpControlPopup, 0, "Windows Skins"
     Control3.CommandBar.Controls.Add xtpControlPopup, 1, "Other Skins"

     Set Control4 = Control3.CommandBar.Controls.Add(xtpControlButton, ID_SKINOPTIONS_OTHER, "Blue")


I want to add blue to the first "Wisndows Skins"
& Black to "Other Skins"











Replies:
Posted By: olebed
Date Posted: 10 March 2017 at 6:02am
Originally posted by Khaled Eissa Khaled Eissa wrote:

     Set Control3 = ControlOptions.CommandBar.Controls.Add(xtpControlPopup, 0, "Skins")
     
     Control3.CommandBar.Controls.Add xtpControlPopup, 0, "Windows Skins"
     Control3.CommandBar.Controls.Add xtpControlPopup, 1, "Other Skins"

     Set Control4 = Control3.CommandBar.Controls.Add(xtpControlButton, ID_SKINOPTIONS_OTHER, "Blue")

I want to add blue to the first "Wisndows Skins"
& Black to "Other Skins"


But you add "Blue" to "Skins" (Control3Smile 

 Set Control4Control3.CommandBar.Controls.Add xtpControlPopup, 0, "Windows Skins"
Set Control5 = Control4.CommandBar.Controls.Add(xtpControlButton, ID_SKINOPTIONS_OTHER, "Blue")



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net