thyVisualCollection

This is the visual ThyAPI Collection Element.  With it, one can hold a collection of any visual Element (that is, any element derivate from thyPanel) and it will perform the thyCollection actions.

Parameters

nameThe element name
vParentThe parent element (must be derivate from thyPanel)
Summary
This is the visual ThyAPI Collection Element.
Populate the thyVisualCollection with the passed arguments.
Inserts a visualElement into the collection and add it as child of vParent
Removes the element from vParent and from collection
Change the position of an element inside the collection and on vParent
Exchange the position of 2 elements

populate

p.populate = function (data)

Populate the thyVisualCollection with the passed arguments.

  • Note - The arguments must be visual elements!

Parameter

dataAn array of visual elements

add

p.add = function (elm,
name,
index)

Inserts a visualElement into the collection and add it as child of vParent

Parameters

elmThe visual element
nameThe name of the element
indexThe index position this element should have.

remove

p.remove = function (elm,
name,
index)

Removes the element from vParent and from collection

Parameters

elmThe element itself
nameThe element name (optional)
indexThe element index (optional)

changeElementIndex

p.changeElementIndex = function (info,
name_also)

Change the position of an element inside the collection and on vParent

Parameters

infoArray that may specify elm, name or oldIndex and new index
name_alsoIf true, the name of the element will be exchanged with the name of the element in the destination index.

_swapIndex

p._swapIndex = function (elm1,
index1,
elm2,
index2)

Exchange the position of 2 elements

Parameters

elm1The first element
index1The position of the first element
elm2The second element
index2The position of the second element
p.populate = function (data)
Populate the thyVisualCollection with the passed arguments.
This is the visual ThyAPI Collection Element.
p.add = function (elm,
name,
index)
Inserts a visualElement into the collection and add it as child of vParent
p.remove = function (elm,
name,
index)
Removes the element from vParent and from collection
p.changeElementIndex = function (info,
name_also)
Change the position of an element inside the collection and on vParent
p._swapIndex = function (elm1,
index1,
elm2,
index2)
Exchange the position of 2 elements
Base class for all other ThyAPI GUI Components
This is the basic ThyAPI Collection Element.