[SOLVED] Disable all buttons |
Post Reply |
Author | |
gibra
Senior Member Joined: 31 October 2008 Location: Italy Status: Offline Points: 288 |
Post Options
Thanks(0)
Posted: 14 April 2011 at 5:48pm |
I have a toolbar where I could disable all buttons at once.
I don't find a property like Enabled which allows me this action.
The better should be something like Toolbar.Enabled = True/False
i.e.
CODE
With CommandBarContacts
.DeleteAll
.EnableCustomization False .Options.ShowExpandButtonAlways = False .Icons.LoadBitmap gsIcons16x16, gaArray16x16, XtremeCommandBars.XTPImageState.xtpImageNormal Set cToolbar = .Add("Contacts", xtpBarTop) With cToolbar
.SetIconSize 16, 16 .ShowGripper = False .Customizable = False .EnableDocking xtpFlagStretchedShared .Enabled = False
' Or .EnableAllButtons = False End With
End With
How to?
The only way to disable all buttons that I find is:
Public Sub DisableToolbar(ByRef tb As CommandBar, ByVal bMode As Boolean)
Dim btn As CommandBarControl For Each btn In tb.Controls btn.enabled = bMode Next End Sub |
|
gibra
CJ SuiteControl v: 13.x to 19.x Windows 10 64bit VS2019 - VB6.0 SP6 <a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Use Update handler: if Control.Parent.BarID = ID_MY_BAR then Control.Enabled = False
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
gibra
Senior Member Joined: 31 October 2008 Location: Italy Status: Offline Points: 288 |
Post Options
Thanks(0)
|
Thank, I will try your suggestion.
|
|
gibra
CJ SuiteControl v: 13.x to 19.x Windows 10 64bit VS2019 - VB6.0 SP6 <a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8 |
|
gibra
Senior Member Joined: 31 October 2008 Location: Italy Status: Offline Points: 288 |
Post Options
Thanks(0)
|
thank, Oleg.
CommandBars Update event is the best choice to set/get disable state.
|
|
gibra
CJ SuiteControl v: 13.x to 19.x Windows 10 64bit VS2019 - VB6.0 SP6 <a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8 |
|
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 |