You are trying to access a private class member from a code other than a class code.

Reminder: A private member can be handled from a code of the class only.

Correction

Two possibilities:

Replace the private member by:

A constant protected member: The value of the member can be read and modified from inside the class and the value of the member can be read from a derived class. The access to the member will be forbidden from any other section of the code.

A constant public member: The value of this member can be read and modified from inside the class or from a derived class. You will only be able to read the value of the member from any other section of the code.

A public member: The access to the member will not be restricted.

Don't handle this private member from one of the project codes.

Example

Using a private member in the click code of a button

Code triggering the error

// -- Declare the classDrawing is ClassPRIVATEBaseColor is int// ColorEND

// -- Click code of a button IF Drawing::BaseColor = LightRed THEN ...