Button on Quick Access controls |
Post Reply |
Author | |
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
How do you try to disable it ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
Hello Guys,
What's up ... still hanging up here ....
any help !!!
Regards.
|
|
:Powerbuilder 10.5
:Codejock suite 11.2.2 ========================= Waleed Seada |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
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 |