Every time i add text to a listbox or listview or a button from the editor it appears on every program launch as it should. The question is why when i add them at runtime and then restart the program this items disappear ( text or buttons ). I know the text can be saved in file but is there any other way like its saved default from the editor.
Share
When you add the text at design time it is saved in the .dfm file and compiled into the program. This does not happen at runtime.
Imagine if it did. It couldn’t really operate in the same way because you can’t have the executable changing once you have deployed the app. You would not want user settings to be stored in the executable. So these settings really need to be external to the application.
To make this happen you need to implement your own persistence mechanism. You would need to save the runtime added contents to a file somewhere (e.g. under the user profile) and then re-load this whenever the application starts.