Print Page | Close Window

Button on Quick Access controls

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=12382
Printed Date: 17 June 2025 at 8:32pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Button on Quick Access controls
Posted By: WaleedSeada
Subject: Button on Quick Access controls
Date 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



Replies:
Posted By: Oleg
Date Posted: 09 October 2008 at 2:58am
How do you try to disable it ?

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: WaleedSeada
Date 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


Posted By: WaleedSeada
Date 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


Posted By: Oleg
Date 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


Posted By: WaleedSeada
Date 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



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