Search code examples
delphidelphi-7

How to detect a different tab has been clicked in A TTabControl?


I just want to know if on TTabControl click, a different tab other than the current tab has been clicked. Ideas are most welcome.

P.S. Please don't ask for code. I am only asking for ideas. Also, posting codes in my company is frowned upon. ( my prev posts were done in Secret)


Solution

  • Apart from TTabControl.OnChange you might also want to consider TTablControl.OnChanging:

    Write an OnChanging event handler to take specific action immediately before the selected tab changes.