<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">ad 1: I never tried two level collection. Are they all published (both collections and their items)?</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">ad 2: You can do (in your component editor) something like:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">var aHook: TPropertyEditorHook;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">begin</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> ...</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook:=nil;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> if not GetHook(aHook) then exit;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> ...</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> //add or insert:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> AddedItem:=aComponent.Columns.Add;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook.PersistentAdded(<span style="font-size: 13.3333px;">AddedItem</span>, True); //this notifies component tree</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook.SelectOnlyThis(<span style="font-size: 13.3333px;">AddedItem</span>); //this selects added object</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> //deleting</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> DeletedItem:=<span style="font-size: 13.3333px;">aComponent</span>.Columns[<span style="font-size: 13.3333px;">aIndex</span>];</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook.DeletePersistent(TPersistent(<span style="font-size: 13.3333px;">DeletedItem</span>)); <span style="font-size: 13.3333px;"> </span><span style="font-size: 13.3333px;">//this notifies component tree</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"><span style="font-size: 13.3333px;"></span><span style="font-size: 10pt;">V. </span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: Werner Pamler via Lazarus <lazarus@lists.lazarus-ide.org><br />
> Komu: Lazarus mailing list <lazarus@lists.lazarus-ide.org><br />
> Datum: 25.04.2018 19:56<br />
> Předmět: [Lazarus] Component editors and related<br />
></p>
Hi all,<br />
<br />
currently I am porting those JVCL components which look interesting to <br />
me <br />
(<a href="https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/jvcllaz/">https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/jvcllaz/</a>), <br />
but at the moment I am stuck with the component editor of the <br />
TJvOutlookBar. This is some kind of two-level vertical menu. The top <br />
level is a list of TJvOutlookBarPage items, and each page has a list of <br />
TJvOutlookbarButton items as second level. Both lists inherit from <br />
TCollection. My problem is that in the component tree of the object <br />
inspector I see only the page items, but not the button "sub-items". See <br />
attached screen shot of Lazarus and the Delphi version for comparison. <br />
How can I make the button subnodes appear in the component tree?<br />
<br />
Another problem: The component comes with a ComponentEditor for the <br />
entire class, which looks similar to that of a TCollection, but contains <br />
a treeview to display the page-button relationships. After some <br />
twiddling around I was able to make this work in Lazarus, i.e. when I <br />
add nodes to the tree in the component editor the corresponding buttons <br />
or pages are added to the control on the form designer; and when I <br />
navigate in the component editor's tree the selected object follows in <br />
the component tree and in the object inspector. But the opposite <br />
direction does not work: When I add a page or button in the object <br />
inspector (by using the Pages and Buttons collection property editors) <br />
the tree in the component editor is not updated. How can I do this?<br />
<br />
Any hints greatly appreciated.<br />
Werner<br />
<br />
<br />
<br />
<br />
----------<br />
<br />
-- <br />
_______________________________________________<br />
Lazarus mailing list<br />
Lazarus@lists.lazarus-ide.org<br />
<a href="https://lists.lazarus-ide.org/listinfo/lazarus">https://lists.lazarus-ide.org/listinfo/lazarus</a><br />