[Lazarus] Component editors and related

Vojtěch Čihák vojtech.cihak at atlas.cz
Wed Apr 25 20:40:17 CEST 2018

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180425/8e3fda7e/attachment.html>

More information about the Lazarus mailing list