Changes

Jump to navigation Jump to search

platform.window:width

368 bytes added, 23:14, 3 September 2011
Line 1: Line 1: −
'''platform.window.width''' is a function that is part of [[:Category:platform.window|platform.window]].
+
'''platform.window:width''' is a function that is part of [[:Category:platform.window|platform.window]].
    
{{Since|3.0}}
 
{{Since|3.0}}
 +
Returns the width in pixel of the current display window.
 +
== Syntax  ==
 +
'''platform.window:width'''()<br />
 +
(No arguments)
   −
== Syntax  ==
+
== Example ==
'''platform.window.width'''()  
+
Below is an example of a program that creates/updates the "theHeight"  and "theWidth" global variables whenever the user resizes the widget's  frame:
 +
<source lang="lua">
 +
function on.resize() --Define a function for the event
 +
    theWidth = platform.window:width()
 +
    theHeight = platform.window:height()
 +
end
 +
</source>
   −
== Example  ==
+
== See Also ==
<syntaxhighlight>ww = platform.window.width()</syntaxhighlight>
+
[[platform.window:height]]
   −
<br /><br />
+
<br />
    
[[Category:platform.window]]
 
[[Category:platform.window]]

Navigation menu