Print Page | Close Window

Group controls

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=6368
Printed Date: 05 February 2025 at 12:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Group controls
Posted By: DonB
Subject: Group controls
Date 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 



Replies:
Posted By: Oleg
Date Posted: 11 February 2007 at 3:20am
Hi,
 
use
IRibbonGroup::Item property


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: DonB
Date Posted: 11 February 2007 at 1:49pm

Duh, boy do I feel stupid :) - thanks




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