Multi select don't work in my script

Hi this is a scriptlet, from A script I am making. It is a listbox I am filling with selected nodes of the scene. It needs to be multi select, but I cant multi select in the listbox. I try to use extended here, but I also try to use Multi. Both are not working. What is the problem?

 

/*********************************************************************/// Globals/*********************************************************************/var selNodes = Scene.getSelectedNodeList()		// Get the selected nodes from te scenevar nSelNodes = selNodes.length;				// The length of the selected node array// Create and define DzListBox: 'Surfaces'var Surfaces = new DzListBox( Dropper );Surfaces.setGeometry( 190, 21, 171, 181 );Surfaces.SelectionMode = Surfaces.Extended;for( var i = 0; i < nSelNodes; i++ ){	if( selNodes[i].name != selNodes[i].getLabel() )	{		Objects.insertItem( selNodes[i].name + "/" + selNodes[i].getLabel() );	}	else	{		Objects.insertItem( selNodes[i].name );	}}

 

Post edited by Silver Unicorn on

Comments

  • What is Objects?

  • There is, by the way, a forum for scripting https://www.daz3d.com/forums/categories/daz-script-developer-discussion - you may want to edit your frist post and select that from the box at the top, to move the thread there.

  • Silver UnicornSilver Unicorn Posts: 3
    edited December 2018
    /*********************************************************************/// Globals/*********************************************************************/var selNodes = Scene.getSelectedNodeList()		// Get the selected nodes from te scenevar nSelNodes = selNodes.length;				// The length of the selected node array // Create and define DzListBox: 'Objects'var Objects = new DzListBox( Dropper );Objects.setGeometry( 190, 21, 171, 181 );Objects.SelectionMode = Objects.Extended;for( var i = 0; i < nSelNodes; i++ ){	if( selNodes[i].name != selNodes[i].getLabel() )	{		Objects.insertItem( selNodes[i].name + "/" + selNodes[i].getLabel() );	}	else	{		Objects.insertItem( selNodes[i].name );	}} 

    Yes good point Richard I copied the wrong part! This is what I wanted to show, that is not working.

    Like you see I make the listbox Objects, set the selection mode, but I can't select multi lines using CRT or SHIFT

    Post edited by Silver Unicorn on
  • SelectionMode should be selectionMode - objects and methods usually have an initial lower-case letter. Also, the modes are static enumerations belonging to the object itself, so instead of Objects.Extended use DzListBox.Extended

  • SelectionMode should be selectionMode - objects and methods usually have an initial lower-case letter. Also, the modes are static enumerations belonging to the object itself, so instead of Objects.Extended use DzListBox.Extended

    Thank you that was the problem!

  • Bah, used the wrong term - I meat properties and methods, not objects and methods. Edited to correct that for future readers.

Sign In or Register to comment.