I was trying to make a macro to avoid duplicating code and comments.
I tried this:
#define GrowOnPage(any Page, any Component) Component.Width := Page.SurfaceWidth; Component.Anchors := [akLeft, akRight, akTop];
However, it can't find the macro. I simply tried calling it like a normal function / procedure:
GrowOnPage(configPage, configTextField);
Maybe I am completly missunderstanding macros here. But the documentation doesn't have any examples.
The reason I am not making a procedure for this, is that the Anchors property isn't available in a common parent class of components such as TCustomEdit.
What would be the correct way to solve this problem?