Setup Factory 10

DlgComboBox.GetProperties

DlgComboBox.GetProperties

This is the first topic This is the last topic  

DlgComboBox.GetProperties

This is the first topic This is the last topic  

OverviewExamples

table DlgComboBox.GetProperties (

number ControlID )

Example 1

combo_prop = DlgComboBox.GetProperties(CTRL_COMBOBOX_01);

Gets the properties from the 1st combo box and stores them in the table "combo_prop".

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 combo box control 02

tProperties = DlgComboBox.GetProperties(CTRL_COMBOBOX_02);

 

-- 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 '02' combo box 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