Setup Factory 10

DlgScrollingText.GetProperties

DlgScrollingText.GetProperties

This is the first topic This is the last topic  

DlgScrollingText.GetProperties

This is the first topic This is the last topic  

OverviewExamples

table DlgScrollingText.GetProperties (

number ControlID )

Example 1

props = DlgScrollingText.GetProperties(CTRL_SCROLLTEXT_BODY);

Gets the properties from the "body" scrolling text control and stores them in the table "props".

 

Example 2

-- function ToString () converts a boolean value (true/false)

-- to a string (True, False).  If the value passed is not

-- of type boolean, the passed value is returned unchanged.

function ToString(Value)

   -- Ensure value is type boolean

   if type (Value) ~= "boolean" then

       -- Value is not type boolean, return unchanged

       return Value;

   elseif Value then

       -- Value is true, return string True

       return "True";

  else

       -- Value is false, return string False

       return "False";

  end

end

 

 

 

 

 

-- Retrieve the properties from scrolling text control 'body'

tProperties = DlgScrollingText.GetProperties(CTRL_SCROLLTEXT_BODY);

 

-- Show the Debug Window.

Debug.ShowWindow(true);

 

-- For each property in the table, do this

for Property, Value in pairs(tProperties) do

   -- Output property to debug window

   Debug.Print(Property .. ": " .. ToString(Value) .. "\r\n\r\n");

end

Gets the properties of the "body" scrolling text control and outputs them to the debug window.  The function ToString is used to convert any boolean values to strings.  If the function is passed a value that is not boolean, the value is returned unchanged.

See also: Related Actions


Learn More: Indigo Rose Software - Setup Factory - Buy Now - Contact Us