Recent

Author Topic: Get a notification after TPropertyEditor.Edit  (Read 1430 times)

Basile B.

  • Guest
Get a notification after TPropertyEditor.Edit
« on: May 17, 2015, 05:07:07 pm »
I'd like to get a simple notification after a TPropertyEditor.Edit is done, basically because the event OnModified of TTIPropertyGrid only works for the simple types (Ordinal, string) and not for TPersistent sub classes (such as TStringList).

by following the flow of the calls i find this:

  • TPropertyEditor.Edit() calls TPropertyEditor.SetPtrValue()
  • TPropertyEditor.SetPtrValue() calls PropertyHook.Modified();
  • TPropertyEditorHook.Modified() calls the global Forms function GetDesignerForm()
  • GetDesignerForm() checks if the global OnGetDesignerForm event is assinged.
  • if so, TPropertyEditorHook.Modified() will check if the resulting form has a .Designer (TIDesigner)
  • if so, the Designer.Modified will be called and that's only where i can be notified

in short: i have to fully implement a custom TIDesigner, just to be notified that a property editor dialog has closed !?

Isn't it a shame ?

Maybe i miss a simpler way out ?
« Last Edit: May 18, 2015, 08:27:18 am by BBasile »

Basile B.

  • Guest
Re: Get a notification after TPropertyEditor.Edit
« Reply #1 on: May 22, 2015, 06:35:02 am »
TTIPropertyGrid.PropertyEditorHook.AddHandlerModified();

does the job much more simply.

 

TinyPortal © 2005-2018