Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Group controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Group controls

 Post Reply Post Reply
Author
Message
DonB View Drop Down
Newbie
Newbie
Avatar

Joined: 25 January 2007
Location: United States
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote DonB Quote  Post ReplyReply Direct Link To This Post Topic: Group controls
    Posted: 10 February 2007 at 2:03pm

How do you access individual controls in a Group?  Used designer to create all controls.  Ribbon does not have CommandBar class (at least I can't find one) so I use an Array filled with ID's to populate anything Ribbon related.

Sub RibbonObjectControlsUsingArray( _
oCB As XtremeCommandBars.CommandBars, _
oRibbonObject As Object, _
iArray() As Long)
Dim i       As Long
Dim iCount  As Long
Dim oCTL    As XtremeCommandBars.CommandBarControl
Dim oCtlDC  As XtremeCommandBars.CommandBarControl
   
oRibbonObject.DeleteAll
iCount = UBound(iArray)
For i = 0 To iCount
 Select Case iArray(i)
 Case C_BeginGroup
  If Not (oCTL Is Nothing) Then oCTL.BeginGroup = True
 Case Else
  Set oCtlDC = oCB.DesignerControls.Find(, iArray(i))
  If Not (oCtlDC Is Nothing) Then
   With oCtlDC
     Set oCTL = oRibbonObject.Add(.Type, .ID, .Caption)
     oCTL.DescriptionText = .DescriptionText
     oCTL.IconId = .IconId
     oCTL.Style = .Style
     oCTL.ToolTipText = .ToolTipText
   End With
   Set oCtlDC = Nothing
  End If
 End Select
Next
Set oCTL = Nothing
End Sub
 
After I call this how do I get access to an individual control to change, say its Style property?  Tried using Ribbon.Controls.Find after routine but it changed Sytle in QuickAccessControls (which uses above Sub) which I did not want to happen.  Any help is appreciated.
 
Regards,
Don 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2007 at 3:20am
Hi,
 
use
IRibbonGroup::Item property
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
DonB View Drop Down
Newbie
Newbie
Avatar

Joined: 25 January 2007
Location: United States
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote DonB Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2007 at 1:49pm

Duh, boy do I feel stupid :) - thanks

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.