Custom Component lazarus / 31-LCL ---------------------------------------------------------------------- JimKueneman · 2019-06-25 04:10 It has been a while since I have done this but I am writing a custom component.  In that component I have created a sub class to group like properties in the object inspector. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    TVirtualExpandProperties = class(TComponent)  private    FImageIndexCollapsed: Integer;    FImageIndexExpanded: Integer;    FImagePosition: TExpandImagePostition;    FImages: TImageList;    FOwnerListview: TCustomVirtualListview;  protected    property OwnerListview: TCustomVirtualListview read FOwnerListview;  public    constructor Create(AOwner: TComponent);    destructor Destroy; override;  published    property Images: TImageList read FImages write FImages;    property ImageIndexExpanded: Integer read FImageIndexExpanded write FImageIndexExpanded;    property ImageIndexCollapsed: Integer read FImageIndexCollapsed write FImageIndexCollapsed;    property ImagePosition: TExpandImagePostition read FImagePosition write FImagePosition;  end; and in the component I create it and publish it in the TVirtualListview class which is what is installed in the IDE Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i constructor TCustomVirtualListview.Create(AOwner: TComponent);begin  inherited Create(AOwner);  .......   FExpandProperties := TVirtualExpandProperties.Create(Self);  ExpandProperties.FOwnerListview := Self;end; I also register the class for the streaming system: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  initialization  RegisterClass(TVirtualExpandProperties); end.       It shows up just fine in the object inspector but when I run the program the changed values in this sub-object are back to default and if I show the form as text this component is not being streamed.... What am I missing. Thanks, Jim ---------------------------------------------------------------------- BeanzMaster · 2019-06-25 12:56 Hi Try to uses TPersistent instead of TComponent for those things Best regards ---------------------------------------------------------------------- howardpc · 2019-06-26 11:04 To have its proerties streamed your OwnerListview instance must be published, not protected.