Link to home
Start Free TrialLog in
Avatar of zebada
zebada

asked on

Embedded component properties

I have a component which has a published property of type: TXYBounds=class(TPersistent)

The published properties in the TXYBounds class show up correctly in the object inspector but they are not saved to the dfm file. Which means that no matter what I set the properties to in the object inspector at design time, at run time they always revert back to their initial values as set in the constructor.

How should I implement this type of embedded component so that it interacts with the object inspector and saves to the dfm file?
Avatar of Lee_Nover
Lee_Nover

property XYBound: TXYBounds read FXYBounds write SetXYBounds stored true;

it works for me without this
ASKER CERTIFIED SOLUTION
Avatar of ivobauer
ivobauer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are properties of TXYBounds also published?
Best you can do is show us the declarations of TXYBounds and the component.
Avatar of zebada

ASKER

Thanks all for your help,

I found the problem, I had declared the component as
  property XYbounds: TXYBounds read FXYBounds;
I changed it to
  property XYbounds: TXYBounds read FXYBounds write FXYBounds;
and it works fine.

ivobauer, due to your suggestion to check the declaration of my component - I compared it to other components that did work and figured out the solution.