Setup Factory 10

DlgProgressBar.GetProperties

DlgProgressBar.GetProperties

This is the first topic This is the last topic  

DlgProgressBar.GetProperties

This is the first topic This is the last topic  

OverviewExamples

table DlgProgressBar.GetProperties (

number ControlID )

Example 1

props = DlgProgressBar.GetProperties(CTRL_PROGRESS_BAR_02);

Gets the properties from the 2nd progress bar 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 progress bar control 01

tProperties = DlgProgressBar.GetProperties(CTRL_PROGRESS_BAR_01);

 

-- 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 '01' progress bar 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