getTreeSelectedItems

<Navigator>:getTreeSelectedItems()

Restituisce un PrtArray contenente la selezione corrente dell'albero. Mode può valere 1 o 0. Con 1 ritorna anche i figli se il ramo è chiuso, con 0 ritorna sempre solo la parte selezionata.

Esempio 80. Esempio "Navigator - getTreeSelectedItems"

function test()
  local withchildren = 1
  local pa = GetNavigator():getTreeSelectedItems(withchildren)
  if pa then
    for i=0, pa:count() do
      local prt = pa:getAt(i)
      if prt then
        alert(prt:getName())
      end
    end
  end
end