CmdFormat and DefaultFormats question
Posted: Mon Oct 24, 2016 12:15 pm
Is it possible to store a set CmdFormat for later use?
I know that I could use Defaults and DefaultFormat, but our code formats the whole sheet in one procedure and later fills it with data, so I cannot set one format enter some data and then set another.
How could I solve our problem? Would it be possible to save the parameters in TFont (or some other structure) and load them into CmdFormat when needed or can the data be loaded from XLS.CmdFormat.Defaults into CmdFormat to be applied with .Apply?
If I use CmdFormat without loading the info from one place then the maintenance of the code becomes really bad as changing the font from 11 to 12 for example would require 10 or more changes in code.
I know that I could use Defaults and DefaultFormat, but our code formats the whole sheet in one procedure and later fills it with data, so I cannot set one format enter some data and then set another.
How could I solve our problem? Would it be possible to save the parameters in TFont (or some other structure) and load them into CmdFormat when needed or can the data be loaded from XLS.CmdFormat.Defaults into CmdFormat to be applied with .Apply?
If I use CmdFormat without loading the info from one place then the maintenance of the code becomes really bad as changing the font from 11 to 12 for example would require 10 or more changes in code.