Difference between revisions of "platform.window:height"

From Inspired-Lua Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''platform.window.height''' is a function that is part of [[:Category:platform.window|platform.window]].
+
'''platform.window:height''' is a function that is part of [[:Category:platform.window|platform.window]].
  
 
{{Since|3.0}}
 
{{Since|3.0}}
 
Returns the height in pixel of the current display window.
 
Returns the height in pixel of the current display window.
 
== Syntax  ==
 
== Syntax  ==
'''platform.window.height'''()
+
'''platform.window:height'''()<br />
 
(No arguments)
 
(No arguments)
  
== Example ==
+
== Example ==
<syntaxhighlight>wh = platform.window.height()</syntaxhighlight>
+
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>
  
<br /><br />
+
== See Also ==
 +
[[platform.window:width]]
 +
 
 +
<br />
  
 
[[Category:platform.window]]
 
[[Category:platform.window]]

Latest revision as of 22:15, 3 September 2011

platform.window:height is a function that is part of platform.window.

This has been introduced in TI-Nspire OS 3.0 (Changes).

Returns the height in pixel of the current display window.

Syntax

platform.window:height()
(No arguments)

Example

Below is an example of a program that creates/updates the "theHeight" and "theWidth" global variables whenever the user resizes the widget's frame:

function on.resize() --Define a function for the event
    theWidth = platform.window:width()
    theHeight = platform.window:height()
end

See Also

platform.window:width