![]() |
Go through all controls |
Post Reply ![]() |
Author | |
chrisABC ![]() Senior Member ![]() ![]() Joined: 05 June 2008 Status: Offline Points: 258 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
chrisABC ![]() Senior Member ![]() ![]() Joined: 05 June 2008 Status: Offline Points: 258 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
chrisABC ![]() Senior Member ![]() ![]() Joined: 05 June 2008 Status: Offline Points: 258 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
what are you trying to do? I think looping through all controls is not the right approach.
|
|
![]() |
|
chrisABC ![]() Senior Member ![]() ![]() Joined: 05 June 2008 Status: Offline Points: 258 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
ijwelch ![]() Senior Member ![]() Joined: 20 June 2006 Status: Offline Points: 262 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
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 |