How to update FNCObjectInspector when linked object is changed

Hello,

I'm using FNCObjectInspector with an object.

How do I update the values of that object in FNCObjectInspector when properties are changed by code outsinde of FNCObjectInspector or when changing of a property changes the value of other properties.

E.g.

  fTMSFNCObjectInspector.BeginUpdate;
  fTMSFNCObjectInspector.Initialize;
  fTMSFNCObjectInspector.&Object := MyObject;
  ...

  -- e.g. MyObject.PropertyStr is changed to '42' by the following line:
  MyObject.property := 42;
  ...

I'm currently using

fTMSFNCObjectInspector.RebuildList;

but this changes the position of the scrollbar which is unwanted.

Is there a better solution?

Thanks

Björn

You can use the following code:

  TMSFNCObjectInspector1.SaveScrollPosition;
  TMSFNCObjectInspector1.RebuildList;
  TMSFNCObjectInspector1.RestoreScrollPosition;

Perfect!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.