<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Am 25.04.2018 um 20:40 schrieb Vojtěch Čihák via Lazarus: <br>
<blockquote type="cite" cite="mid:20180425204017.1C3573CE@atlas.cz">
<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>
</blockquote>
<br>
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.<br>
<br>
<blockquote type="cite" cite="mid:20180425204017.1C3573CE@atlas.cz">
<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>
</blockquote>
<br>
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).<br>
<br>
</body>
</html>