advPanel MinMaxButton


How can I tell if the user has specifically clicked on the panels MinMaxButton?

The OnResize is fired often.

and the OnMaximize also triggers if the panel has been maximised in code.

At the moment I want the panel to auto maximise or minimise depending on the content within the panel. However, if the user specifies that they want to keep the panel open (by clicking the MinMaxButton) then that should override the standard behaviour.


OnMaximimize & OnMinimize are triggered.

These events are also triggered when you set the state programmatically.
To make the difference between the user clicking the min/max buttons and programmatically setting min/max state, you could set a flag right before you do the programmatic change and reset that flag after the programmatic change was done and use that flag from the OnMaximize / OnMinimize event to take the appropriate action.