Problem updating RibbonBar to rel. 18 |
Post Reply |
Author | |
Superpippo
Groupie Joined: 02 March 2005 Status: Offline Points: 67 |
Post Options
Thanks(0)
Posted: 14 November 2018 at 1:10pm |
I have updated a simple vb6 project to codejock rel 18. The code have a simple ribbon bar and with codejock rel 15 it works with a nice blue ribbonbar, updating to commandbar control to rel 18 the ribbon is black. What's wrong ? the code to create the ribbonbar is the following, simply create a vb6 form put a commandbar control inside it and copy the following code in the form load event: Dim MyRibbonBar As RibbonBar Dim RibTab As RibbonTab Dim RibGroup As RibbonGroup Dim Control As CommandBarControl 'create a ribbonbar Set MyRibbonBar = CommandBars.AddRibbonBar("The Ribbon") MyRibbonBar.EnableDocking xtpFlagStretched 'create a tab Set RibTab = MyRibbonBar.InsertTab(0, "&TestTab") 'create a group Set RibGroup = RibTab.Groups.AddGroup("FirstGroup", 1) RibGroup.Caption = "FirstGroup" 'create a control Set Control = RibGroup.Add(xtpControlButton, 100, "FirstButton", -1, False) ' Control.BeginGroup = BeginGroup Control.DescriptionText = "FirstButton" Control.Style = 0 'ButtonStyle Control.Category = "controls" 'Category 'refresh ribbonbar MyRibbonBar.RecalcLayout Thanks a lot |
|
SuperPippo
|
|
gibra
Senior Member Joined: 31 October 2008 Location: Italy Status: Offline Points: 288 |
Post Options
Thanks(0)
|
I confirm this problem (using 16.4 and 18.2 versions) With 15.3 works fine.
|
|
gibra
CJ SuiteControl v: 13.x to 19.x Windows 10 64bit VS2019 - VB6.0 SP6 <a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8 |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 294 |
Post Options
Thanks(0)
|
Hello, you need to add code with style initialization as below Dim MyRibbonBar As RibbonBar Dim RibTab As RibbonTab Dim RibGroup As RibbonGroup Dim Control As CommandBarControl 'create a ribbonbar Set MyRibbonBar = CommandBars.AddRibbonBar("The Ribbon") MyRibbonBar.EnableDocking xtpFlagStretched 'create a tab Set RibTab = MyRibbonBar.InsertTab(0, "&TestTab") 'create a group Set RibGroup = RibTab.Groups.AddGroup("FirstGroup", 1) RibGroup.Caption = "FirstGroup" 'create a control Set Control = RibGroup.Add(xtpControlButton, 100, "FirstButton", -1, False) ' Control.BeginGroup = BeginGroup Control.DescriptionText = "FirstButton" Control.Style = 0 'ButtonStyle Control.Category = "controls" 'Category 'refresh ribbonbar MyRibbonBar.RecalcLayout CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.path & "\Styles\Office2016.dll", "Office2016WordColorful.ini" CommandBars.VisualTheme = xtpThemeOffice2016 CommandBars.EnableFrameTheme True Regards, Artem Gontarenko |
|
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 |