Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Button on Quick Access controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Button on Quick Access controls

 Post Reply Post Reply
Author
Message
WaleedSeada View Drop Down
Groupie
Groupie
Avatar

Joined: 29 March 2007
Location: Egypt
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaleedSeada Quote  Post ReplyReply Direct Link To This Post Topic: Button on Quick Access controls
    Posted: 09 October 2008 at 2:56am
Hello All,
 
I have a simple button on the QuickAccessControls and also added before to the commandbars control.
 
On Ribbonbar:
------------------
Set Control = GroupFile.Add(xtpControlButton, ID_TRNS_AuditCase, ID_TRNS_AuditCase_L(Language), False, False)
On QuickAccessControls:
------------------------------
RibbonBar.QuickAccessControls.Add xtpControlButton, ID_TRNS_AuditCase, ID_TRNS_AuditCase_L(Language), False, False
 
I try to disable that button on the Commandbar control, it doesn't reply but the same button on the QuickAccessControls replies and get disabled.
 
Should I add the same button with different ID !!!???
What is the difference between the same button on the two situation.
 
 
Best regards,
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
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: 09 October 2008 at 2:58am
How do you try to disable it ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
WaleedSeada View Drop Down
Groupie
Groupie
Avatar

Joined: 29 March 2007
Location: Egypt
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaleedSeada Quote  Post ReplyReply Direct Link To This Post Posted: 09 October 2008 at 3:05am
Hello,
 
I use this code:
 
    For Each i In TransIDs
        'Disable the button on the ribbon
        Set Control = RibbonBar.FindControl(Null, i)
        If Not (Control Is Nothing) Then Control.Enabled = False
        'Disable the button on the controlsystem
        Set Control = RibbonBar.ControlSystemButton.Controls.Find(Null, i)
        If Not (Control Is Nothing) Then Control.Enabled = False
        ' Has no effect ...
        'Set Control = RibbonBar.QuickAccessControls.Find(0, i)
        'If Not (Control Is Nothing) Then Control.Enabled = False
    Next i
Please note that the buttons on the ControlSystem also not repling.
Regards
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
Back to Top
WaleedSeada View Drop Down
Groupie
Groupie
Avatar

Joined: 29 March 2007
Location: Egypt
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaleedSeada Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2008 at 1:44am
Hello Guys,
 
What's up ... still hanging up here ....
 
any help !!!
 
Regards.
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
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: 13 October 2008 at 6:15am
Hi,
So your code works as expected.
FindControl return first instance of Button and you disable it.
 
Use Actions (see Actions sample) or Update handler (See Any sample) to Enable/Disable items, Show/Hide, Check.Uncheck.
 
Use FindControl onyl when you sure there is only one control with this ID.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
WaleedSeada View Drop Down
Groupie
Groupie
Avatar

Joined: 29 March 2007
Location: Egypt
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaleedSeada Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2008 at 8:55am
Oleg,
 
Find Control didn't work as excpected ....
 
I used the Update event in the commandbar to enable/disable buttons.
 
Regards,
 
 
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
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.203 seconds.