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

Go through all controls

 Post Reply Post Reply
Author
Message
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post Topic: Go through all controls
    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
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 3:43pm
what are you trying to do?  I think looping through all controls is not the right approach.
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post 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.
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.250 seconds.