Difference between revisions of "Lua:Class:Component"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Component '''class''': ('''Inheritance''': ''[[Object]]'') | + | [[Category:Lua]] |
+ | Component '''class''': ('''Inheritance''': ''[[Lua:Class:Object|Object]]'') | ||
Base class for components. | Base class for components. | ||
Line 7: | Line 8: | ||
: Number of child components. | : Number of child components. | ||
− | ; Component[ | + | ; Component[''index''] : Component : ''Readonly'' |
: Array containing the child components. Starts at 0. | : Array containing the child components. Starts at 0. | ||
− | ; ComponentByName[ | + | ; ComponentByName[''name''] : Component : ''Readonly'' |
: Returns a component based on the name. | : Returns a component based on the name. | ||
Line 26: | Line 27: | ||
: Returns the number of components attached to his component. | : Returns the number of components attached to his component. | ||
− | ; getComponent(index) : Component | + | ; getComponent(''index'') : Component |
: Returns the specific component. | : Returns the specific component. | ||
− | ; findComponentByName(name) : Component | + | ; findComponentByName(''name'') : Component |
: Returns the component with this name. | : Returns the component with this name. | ||
Line 35: | Line 36: | ||
: Return the name. | : Return the name. | ||
− | ; setName( | + | ; setName(''newName'') |
: Changes the name. | : Changes the name. | ||
Line 41: | Line 42: | ||
: Get the tag value. | : Get the tag value. | ||
− | ; setTag( | + | ; setTag(''tagValue'') |
: Sets an integer value. You can use this for ID's. | : Sets an integer value. You can use this for ID's. | ||
Line 47: | Line 48: | ||
: Returns the owner of this component | : Returns the owner of this component | ||
− | + | {{LuaSeeAlso}} | |
− | |||
− | |||
=== Related Functions === | === Related Functions === | ||
− | * [[createClass]] | + | * [[Lua:createClass|createClass]] |
− | * [[inheritsFromObject]] | + | * [[Lua:inheritsFromObject|inheritsFromObject]] |
− | * [[inheritsFromComponent]] | + | * [[Lua:inheritsFromComponent|inheritsFromComponent]] |
− | * [[inheritsFromControl]] | + | * [[Lua:inheritsFromControl|inheritsFromControl]] |
− | * [[inheritsFromWinControl]] | + | * [[Lua:inheritsFromWinControl|inheritsFromWinControl]] |
=== Related Classes === | === Related Classes === | ||
− | * [[Object]] | + | * [[Lua:Class:Object|Object]] |
− | * [[Control]] | + | * [[Lua:Class:Control|Control]] |
− | * [[WinControl]] | + | * [[Lua:Class:WinControl|WinControl]] |
− | * [[Application]] | + | * [[Lua:Class:Application|Application]] |
− | * [[Form]] | + | * [[Lua:Class:Form|Form]] |
Latest revision as of 01:47, 25 January 2018
Component class: (Inheritance: Object)
Base class for components.
Properties[edit]
- ComponentCount : integer : Readonly
- Number of child components.
- Component[index] : Component : Readonly
- Array containing the child components. Starts at 0.
- ComponentByName[name] : Component : Readonly
- Returns a component based on the name.
- Name : string
- The name of the component.
- Tag : integer
- Free to use storage space. (Usefull for id's)
- Owner : Component
- Returns the owner of this object. Nil if it has none.
Methods[edit]
- getComponentCount() : integer
- Returns the number of components attached to his component.
- getComponent(index) : Component
- Returns the specific component.
- findComponentByName(name) : Component
- Returns the component with this name.
- getName() : string
- Return the name.
- setName(newName)
- Changes the name.
- getTag() : integer
- Get the tag value.
- setTag(tagValue)
- Sets an integer value. You can use this for ID's.
- getOwner() : Component
- Returns the owner of this component