[SOLVED!] Change System Button at runtime? |
Post Reply |
Author | ||||
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
Posted: 25 December 2009 at 11:00pm |
|||
Hello Folks; here's a quick question for you:
I know that you can change the ribbon theme in runtime, but can you change the system button style at runtime also?
You know, like change it from the "Orb" to the rectangular blue item.
Also, how could you do this from another sub other than commandbars_execute?
|
||||
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
||||
cmm2006
Senior Member Joined: 26 September 2006 Status: Offline Points: 118 |
Post Options
Thanks(0)
|
|||
hi,
you can use CommandBars_Update to do so
good luck
|
||||
Language: Visual Basic 6 SP6
OS: Windows XP Pro SP3 Product: Codejock Xtreme SuitePro 13.1 |
||||
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
|||
I assumed that but how would I call it? I normal use the "CommandBars.findcontrol (type, ID) but that just doesn't seem to work with the Ribbon system button.
|
||||
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
||||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|||
There are a couple of ways that you can do this. The easiest is:
As it seems that the Ribbon is Item #1 in the commandbars control collection. However, I don't think that this is the safest way, as you can't guarantee that CJ will always maintain the Ribbon in that position. IMHO, a better option would be to store a reference to the Ribbon control in a module level variable when you create it, such as: In the General Declarations section:
In the sub where you add the ribbon bar:
And then when you want to change the ribbon style:
|
||||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||||
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
|||
Hey man long time no talk!
But I greatly appreciate the response.
I'll try these options right now & let you know if it works.
|
||||
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
||||
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
|||
Okay. Since you said there was no guarantee for the first option I went ahead and tried the second one.
And guess what? It works great! It's nice to get some real support around here ever once and a while.
Well, I'm off to try that other option for combined command buttons.
Thanks jpbro, I really appreciate it!
|
||||
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
||||
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 |