Setup Factory 10

Screen.GetProperties

Screen.GetProperties

This is the first topic This is the last topic  

Screen.GetProperties

This is the first topic This is the last topic  

OverviewExamples

table Screen.GetProperties (

)

Example 1

tScreenProperties = Screen.GetProperties();

Gets the properties from the current screen and stores them in table "tScreenProperties".

Example 2

-- Initialize nButtons to zero

nButtons = 0;

 

-- Get the screen properties

tProps = Screen.GetProperties();

 

-- Traverse through the table, looking for buttons.

-- When one is found, add one to nButtons

for nIndex, Data in pairs(tProps.Controls) do

   if Data.Type == 1 then

       -- Item is a button

       nButtons = nButtons + 1;

   end

end

 

-- Output the button count to the user

Dialog.Message("Button Count", "There are " .. nButtons .. " buttons on this screen.");

Retrieves the properties from the current screen, stores them in table "tProps", and counts the number of buttons on the current screen.  The result is displayed to the user as a message dialog.

See also: Related Actions


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