Print Page | Close Window

Go through all 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=11133
Printed Date: 07 October 2024 at 6:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Go through all controls
Posted By: chrisABC
Subject: Go through all controls
Date Posted: 20 June 2008 at 6:58pm
I want to look through all controls in a RibbonBar
eg.  something like this:

     For x = 1 to RB.Controls.Count
        RB.Control(x).ToolTip = ""
    Next


Can anyone show me how to do this please?


-------------
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6



Replies:
Posted By: chrisABC
Date Posted: 27 June 2008 at 5:47am
Guess this is a difficult question, eh?

-------------
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6


Posted By: SuperMario
Date Posted: 27 June 2008 at 8:31am
Something like this:

    Dim x As Integer
    For x = 0 To RibbonBar.Controls.Count
        If RibbonBar.Controls.Item(x).Type = xtpControlButton Then
            Debug.Print RibbonBar.Controls.Item(x).ToolTipText
        End If
    Next x


Posted By: chrisABC
Date Posted: 27 June 2008 at 9:38am
I wish it was that simple 

But for example, looking at my ribbonBar I have over 80 Controlbuttons in it, and RibbonBar.Controls.Count = 17

ie. the problem is that .Controls doesn't include ALL the controls.

I am guessing that some controls (eg PopUp MenuBars) have their own collections of ControlButtons.  How do I get at those?

 


-------------
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6


Posted By: SuperMario
Date Posted: 27 June 2008 at 3:43pm
what are you trying to do?  I think looping through all controls is not the right approach.


Posted By: chrisABC
Date Posted: 27 June 2008 at 6:27pm
For example.
Option to turn off all tooltips.

For i = 1 to Buttons.count
    Button(i).TooltipText = ""
Next


If you can suggest alternative, I am happy to try it.


-------------
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6


Posted By: ijwelch
Date Posted: 27 June 2008 at 9:32pm
Tooltips is turned on/off using the CommandBars.Options.ToolBarScreenTips property. Take a look at CommandBarsOptions object in help file for all available settings.

If you need to access properties of particular controls on ribbonbar then use the update event or enable actions.



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