Welcome
Object
1.0.0.3
A L-OOP model for all standard AMS Visual Object's actions.
Imagine Programming
www.imagine-programming.com
contact@imagine-programming.com
© Imagine Programming, 2010.
Object:Create
Object:Append
Object:SetAppendDelimiter
Object:GetRect
Object:SetRect
Object:Center
Object:CenterRelative
Object:ToggleEnabled
Object:ToggleVisible
Object:Destroy
Grid.GetCellState
Object:RestoreOriginalRect
(table) Object:Create ( | (string) Objectname, (table) Propertiestable, (number) Objecttype ) |
Creates a new L-OOP Object for an AMS visual object.
Note: This method can not be used as method for L-OOP objects
(string) The object name to create a handle for.
(table) When the Object given doesn't exist, create it on the fly!
Note: An object type is requried now too!
(number) Objecttype for the to be created object.
CONSTANT | VALUE | DESCRIPTION |
OBJECT_BUTTON | 0 | NA |
OBJECT_LABEL | 1 | NA |
OBJECT_PARAGRAPH | 2 | NA |
OBJECT_IMAGE | 3 | NA |
OBJECT_FLASH | 4 | NA |
OBJECT_VIDEO | 5 | NA |
OBJECT_WEB | 6 | NA |
OBJECT_INPUT | 7 | NA |
OBJECT_HOTSPOT | 8 | NA |
OBJECT_LISTBOX | 9 | NA |
OBJECT_COMBOBOX | 10 | NA |
OBJECT_PROGRESS | 11 | NA |
OBJECT_TREE | 12 | NA |
OBJECT_RADIOBUTTON | 13 | NA |
OBJECT_RICHTEXT | 14 | NA |
OBJECT_CHECKBOX | 15 | NA |
OBJECT_SLIDESHOW | 16 | NA |
OBJECT_GRID | 17 | NA |
(table) This will return a handle/object for the Object class.
With this object, you can preform any action available
in the AMS Object's actionlist.
Input1 = Object:Create("Input1") --it exists, so no properties table and objecttype have to be passed.
Input1:SetText("Hello World!");
Input1:Append("Greets from Imagine Programming!","\r\n");
Input1:Destroy();
Object:Append ( | (string) Text, (string) Delimiter ) |
Append text to the object's text
(string) The text to append
(string) The custom delimiter, if you don't use the default one you can set.
This action dose not return any value.
Input1:Append("This is a string, which will append using the defailt delimiter");
Input1:Append("This string will be appended using a custom delimiter", "\r\n\r\n");
Object:SetAppendDelimiter ( | (string) Delimiter ) |
Set's the default 'Append' delimiter for Object:Append();
Note: The AppendDelimiter is unique for each object handle!
(string) The default delimiter for Object:Append();
This action dose not return any value.
Input1:SetAppendDelimiter("\r\n\r\n");
Input1:SetText("First line");
Input1:Append("Second line of text using the newly set delimiter");
Input1:Append("Third line of text using only one newrule", "\r\n");
(table) Object:GetRect () |
Get the position and size of an object.
(table) This function will return a table containing the next entrys:
Result.X = Position from the left in pixels
Result.Y = Position from the top in pixels
Result.Width = The width of the object in pixels
Result.Height = The height of the object in pixels
Par1 = Object:Create("Paragraph1");
local oldRect = Par1:GetRect();
oldRect.X = oldRect.X+10;
oldRect.Y = oldRect.Y+10;
Par1:SetRect(oldRect); -- you can also pass the rect as 4 seperate values, see the helpfile on this function.
Object:SetRect ( | (number) Position_X (Or the RectTable), (number) Position_Y, (number) Size_Width, (number) Size_Height ) |
Set the size and position of an object.
(number) The position from the left, leave nil for old position.
Note: You can parse a Rect table aswell, {X=0,Y=0,Width=100,Height=200} is an example of a RectTable
(number) The position from the top, leave nil for old position.
(number) The width of the object, leave nil for old size.
(number) The height of the object, leave nil for old size.
This action dose not return any value.
-- Example 1
Par1 = Object:Create("Paragraph1");
local oldRect = Par1:GetRect();
oldRect.X = oldRect.X+10;
oldRect.Y = oldRect.Y+10;
Par1:SetRect(oldRect); -- you can also pass the rect as 4 seperate values, see the helpfile on this function.
-- Example 2, as from the Par1:SetRect line in first example
Par1:SetRect(oldRect.X+10,oldRect.Y+10,oldRect.Width-10,oldRect.Height-10);
-- Example 3, ignore fields, they stay what they were.
Par1:SetRect(oldRect.X+10,nil,oldRect.Width-10,nil);
Object:Center ( | (number) Windowhandle = Application.GetWndHandle() ) |
Center an object on the page.
(number) A valid window handle, the handle of the window this object's on.
Note: This is required, so the object can be centered on the window/dialog.
This action dose not return any value.
Par1:Center(Application.GetWndHandle());
Object:CenterRelative ( | (string) Parent Object ) |
Center an object onto another object
(string) The object to center this object on.
This action dose not return any value.
Par1:CenterRelative("Paragraph2");
Object:ToggleEnabled () |
Toggles the enabled state for an object
This action dose not return any value.
Object:ToggleVisible () |
Toggles the visible state for an object
This action dose not return any value.
Object:Destroy ( | (boolean) RemoveObject = false ) |
Destroys the handle for the object.
(boolean) Removes object from the Page/DialogEx
This action dose not return any value.
Grid.GetCellState ( | (string) Object Name = "", (number) Row, (number) Column ) |
Returns a table containing the state of a cell.
Note: This is also in the Object Action Plugin, Object:GetCellState
(string) The object name of the grid object.
(number) The row
(number) The column
This action dose not return any value.
Object:RestoreOriginalRect () |
Restores the initial position and size for an object.
Note: This would be the position and size from the time Object:Create was called for this object.
This action dose not return any value.
© Imagine Programming, 2010.
This File Was Generated With AMS ActionFile Editor