Am 25.04.2018 um 20:40 schrieb Vojtěch Čihák via Lazarus:

ad 1: I never tried two level collection. Are they all published (both collections and their items)?


Yes. And both collections are accessible in the object inspector: The JvOutlookBar has a property "Pages", the ellipsis button next to it opens the usual collection property editor which can be used to add, delete or rearrange pages. And when one of the pages is selected the object inspector displays the property "Buttons", again with an ellipsis button to open another collection property editor, now for the buttons. This part is working out of the box. The problem is the component tree which only shows the page nodes but no button nodes.

ad 2: You can do (in your component editor) something like:

var aHook: TPropertyEditorHook;

begin

  ...

  aHook:=nil;

      if not GetHook(aHook) then exit;

  ...

  //add or insert:

AddedItem:=aComponent.Columns.Add;

aHook.PersistentAdded(AddedItem, True);  //this notifies component tree

aHook.SelectOnlyThis(AddedItem);   //this selects added object

  //deleting

   DeletedItem:=aComponent.Columns[aIndex];

 aHook.DeletePersistent(TPersistent(DeletedItem)); //this notifies component tree


This is for notification of the component tree by the component editor and this code is already there and working. What I want is notification of the component editor by the designer if pages or buttons are added while the component editor is open (the component editor is not modal).

-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to