![]() |
Enable works not as expected |
Post Reply ![]() |
Author | |
Fabian ![]() Senior Member ![]() ![]() Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
![]() ![]() ![]() ![]() ![]() Posted: 16 August 2006 at 10:25am |
Hello
I have a very strange problem (using VB6, designer commandbars):
If I set enabled=False for all controls on all commandbars the controls are disabled (grayed out) as expected. But the accellerator still works (disabling the control in the Update event ist too slow).
My loop to disable all controls:
For Each Bar in CommandBars
Bar.FindControls(,ID_PRINT,,True).Enabled = False
Next Bar
Do I miss something???
Thanks for any help
Fabian
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Why not at the beginning of the Execute event try:
If Control.Enabled = False Then Exit Sub End If |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Yes, it is deigned behaviour. In 10.3 was added actions to help set Enable/Checked states. See Actions sample.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Fabian ![]() Senior Member ![]() ![]() Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
![]() ![]() ![]() ![]() ![]() |
Hello SuperMario
The Enabled property is switching to true on any accellerator key...
The solution is definitively the new Action object.
Thanks
Fabian
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
![]() |
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 |