Changes

Jump to: navigation, search

on.resize

18 bytes added, 21:12, 3 September 2011
/* Example */
Below is an example of a program that creates/updates the "theHeight" ad "theWidth" global variables whenever the user resizes the widget's frame:
<source lang="lua">
function on.resize() --Define a function for the eventevents
theWidth = platform.window:width()
theHeight = platform.window:height()
</source>
You can then refer to the height and the width of the widget by calling the global variables instead of the [[:Category:platform.window|platform.window]] methods.
[[Category:Events]]