[EDIT] - or maybe I should use Form1.OnKeyDown or sth like that to check which tab is active and then look for SynEdit instance and run some procedure that is run on OnChange event of that SynEdit.. Ehh this is so confusing Ok It will be difficult to explain but I will try.
I wrote a text editor based on tabs that I can add and remove using the buttons.
I would like the title of the active tab to change when the user makes some change in the text, e.g.
The name of the tab is New File.txt
The user enters some change in SynEdit (he adds his content) and then the name of the active bookmark changes to "New_file.txt (*)" - all that he knows that he will have to save the changes in the file because he changed something.
The change of the tab title is simple
PageControl.ActiveTab.Caption: = PageControl.ActiveTab.Caption + '(*)';
but I do not know how to refer to the OnChange event of the component that I created dynamically using the code.
Or maybe I know how to refer to it but I do not know when.
I hope this is clear