I am trying to use the [ISPP] section to define a hexadecimal color which will later be used in the [Code] section as a spot color, the value of which may change in the future, but I am getting a type mismatch error when running. Here are the relevant sections from the code:
[ISPP]
#define ColorPetrol "$C8C264"
[Code]
procedure InitializeWizard();
var
PortLabel: TNewStaticText;
begin
PortLabel := TNewStaticText.Create(WizardForm);
PortLabel.Caption := 'Port';
PortLabel.Top := ScaleY(78);
PortLabel.Parent := Page.Surface;
PortLabel.Font.Color := ExpandConstant('{#ColorPetrol}');
end;
I am assuming the error is caused by the define constant being a string and the PortLabel.Font.Color requiring a hex value. How can the constant be defined in the [ISPP] section and used in this way correctly?