0
votes

I am currently developing a Delphi XE5 Android app and I am having trouble setting certain property values at run time.

For example a TPanel has a property Align, which can be set to alClient.

If I put a panel on the form I am able to change the property Align to alClient.

However if I try to set the property in code, the alClient has a squiggly red line under it and the error

Undeclared identifier alClient

associated with it.

aPanel : TPanel;

aPanel.Align := alClient;

I think I have the right includes file, and have to have if the panel is on the form.

Any Ideas how I can fix this issue?

1
Figure it out. You have to use aPanel.Align := TAlignLayout.alClient; - Shane
Align is a scoped enumerator so you have to do what Shane and RezaRahmati have already pointed out. - Umair Ahmed

1 Answers

3
votes

as it is an Enum you should use TAlignLayout.alClient