Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Enable works not as expected
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Enable works not as expected

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

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Topic: Enable works not as expected
    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
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: 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post 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
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.047 seconds.