TAdvToolPanel Stays Locked

I have a modal form containing a TAdvToolPanelTab and a number of TAdvToolPanels. When I close the form there is a bit of code that unlocks all locked Tool Panels. If this code is in an OnClick event handler of a "Close" button all works as expected and all panels stay unlocked. However, if I put the code in the form's OnClose or OnCloseQuery handlers, then the changes are not persistent and the previously locked panels are still locked if I re-open the form. However, if I close the form again then the panels stay unlocked if I open it a 3rd time. Obviously no problem if the user uses the Close button, but not if they use the close form border icon.

Try to call AdvToolPanelTab.SaveState from the form's OnCloseQuery event handler after panels are in state you want to save them in.

That didn't work, Bruno. However, I did find an odd work around. I was unlocking all the Tab Panels using this code:

for var i := 0 to Tabs.Panels.Count-1 do
Tabs.Panels.Items[i].Panel.Locked := false;

but if I set each panel using the named panel object it works OK:
Panel1.Locked := false;
Panel2.Locked := false;

It isn't a particularly robust solution, but OK for this particular application.

Strange, if you could isolate this and send a test project + steps to reproduce, we can investigate.

I have isolated the problem in a small project, Bruno. How can I send it to you?

Send it via email:

Did you find anything using the project I sent, Bruno?

I searched the mailbox but could not find an email from "Holden Paul".
Can you make sure to NOT include files like EXE files that could trigger email blocking?