You are not logged in.
I try to use TSQLCustomToolBar like this:
...
...
TTestAction =
    (taTest1,taTest2);
...
...
FToolBar: TSQLCustomToolBar;
...
procedure ActionClick(Sender: TObject);
begin
    case TSynToolButton(Sender).Index of
        0:ShowMessage('Test -1');
        1:ShowMessage('Test -2');
    end;
end;
...
...
FToolBar.Init(self,TypeInfo(TTestAction),ActionClick,ImageList,'');
FToolBar.AddToolBar('Test')this code is work as expected, but i want to use TTestAction in the case evaluate, something like:
    case TTestAction(Sender) of
        taTest1:ShowMessage('Test -1');
        taTest2:ShowMessage('Test -2');
    end;how to use an associated action of TSynToolButton;
many thanks.
Offline
You can use:
case TTestAction((Sender as TSynToolButton).Tag) of
  taTest1: ....See how the buttons are created in TSynToolBar.CreateToolButton() method of SQlite3Toolbar.pas.
Offline
thank you ab.
Offline