Print Page | Close Window

Enable works not as expected

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=4815
Printed Date: 20 June 2025 at 3:44pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Enable works not as expected
Posted By: Fabian
Subject: Enable works not as expected
Date 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



Replies:
Posted By: SuperMario
Date Posted: 16 August 2006 at 11:10am
Why not at the beginning of the Execute event try:

If Control.Enabled = False Then
    Exit Sub
End If


Posted By: Oleg
Date Posted: 16 August 2006 at 11:52am
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


Posted By: Fabian
Date Posted: 17 August 2006 at 1:01am
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



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