VCL AdvToolBarButton and Linked action


we're migrating our app from XE6 to XE10.3 (and TMS UI Pack and durung the tests we've faced this problem.

  • we have a toolbar in a "main form" with a series of TAdvToolBarButtons.
  • The button has the "action" property linked
  • When the "detail form" is called, we dock the toolbar to the new opened form
  • The "main form", show/hide and enable/disable the TAction and i expect (like the previuos version that is working fine) that the TAdvToolBarButton show/hide and enable/disable.

I've already called "AdvToolbar.Update", but some controls doesent match the "enabled/disabled" (but match the visible property of the TAction).

That's an extract of my app-log:
[ 904.346] acAggiorna.Visible -> True (the action)
[ 904.346] acAggiorna.Enabled -> True
[ 904.346] cmdAggiorna.Visible -> True (the button)
[ 904.346] cmdAggiorna.Enabled -> False

Is there something i can do to make the button match the enabled/disabled property of the TAction?


Can you isolate this and see if this can be reproduced in a standalone project and if so, send the sample source project so we can investigate?


I'm here trying to reproduce the error in a standalone project but without success.
Ok, let's being pragramatic: If i test the property in the button is set to "Enabled -> False", so there's something that make this change.
Is there a way to intercept in a TAdvToolbarButton the "Enabled" property status changing?


Ok, I've got it.
TAdvToolBarButton linked to action.
The Action is enabled.
If i disable the button (btn.enabled->False) and set action.enabled -> True (which is already enabled), the button remain disabled (because the action actually didn't change the Enabled status) =(.

Thanks anyway.

I think that there's some work coming for me.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.