Form ‘OnActivate’ event issue


Delphi XE8

Firemonkey/Multi View

Have a form in a Firemonkey (Multi View) app that contains a tab control with 3 tabs. On each tab there is a data grid connected to a dataset (separate dataset for each grid), a navigation control for each grid and a button to perform an action associated with the grid.

My problem is that in one of the tabs, pressing on the button to perform a particular action always calls the Form’s ‘OnActivate’ event. The button’s ‘OnClick’ event contained a MessageDlg (non blocking type) that asks a Yes/No question and clicking the Yes button would also fire the ‘OnActivate’ event. I blocked out the MessageDlg code to perform the action without asking the question but that ends up with the same result…..OnActivate.

This does NOT happen when in any of the other tabs. I cannot understand why this should be happening.

Any body have any ideas why this should be happening?

Thanks in advance.


Comments are closed.