dcl_Tree_AddChild without list

Started by stephan_35, June 12, 2009, 01:56:18 AM

Previous topic - Next topic

stephan_35

Hello,

With old opendcl version, we can use dcl_Tree_AddChild with and without list ...

Quote
Method AddChild (Without Lists) as Long

This method adds a child tree item to a top level tree item or other child tree item. A child is a tree item that is connected to a parent or owner tree item. This method returns the long integer value of the new node item key.

Please note! Adding node items with String Keys attached to them can have expanded images. 

AutoLISP Syntax:
(Setq rValue (dcl_Tree_AddChild  boite
   ParentKey [as String or Long]
   Text  [as String]
   OptionalKey  [as String]
   OptionalImageIndex [as Integer]
   OptionalSelectedImageIndex  [as Integer]
   OptionalExpandedImageIndex [as Integer]))


Quote
Method AddChild (Using Lists)

This method adds a child tree item to a top level tree item or other child tree item.

Note:
Create list in the manor shown as follows:
          (List (List x y ...) (List x y ...) ...)
We have found ObjectARX does not always like lists created as follows:
         '(x y ...) (x y ...) ... 

Please note! Adding node items with String Keys attached to them can have expanded images. 

AutoLISP Syntax:
(dcl_Tree_AddChild  boite
   (list (list 
   ParentKey [as String or Long]
   Text  [as String]
   OptionalKey  [as String]
   OptionalImageIndex [as Integer]
   OptionalSelectedImageIndex  [as Integer]
   OptionalExpandedImageIndex [as Integer])
   ...))



With new OpenDCL V5x
Code (autolisp) Select

(dcl_Tree_AddChild boite(List of Lists as (ParentItem [as Handle or String] Label [as String] {Key [as String]} {ImageIndex [as Integer]} {SelectedImageIndex [as Integer]} {ExpandedImageIndex [as Integer]}) ...))


Will you give up working without list ????

Thanks for reply
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

The function should still accept either syntax. To make things simpler, only the more flexible form is documented.
Owen Wengerd (Outside The Box) / ManuSoft