Changes

Jump to navigation Jump to search

on.resize

18 bytes added, 22:12, 3 September 2011
Line 9: Line 9:  
Below is an example of a program that creates/updates the "theHeight" ad "theWidth" global variables whenever the user resizes the widget's frame:
 
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">
 
<source lang="lua">
function on.resize() --Define a function for the event
+
function on.resize() --Define a function for the events
 
     theWidth = platform.window:width()
 
     theWidth = platform.window:width()
 
     theHeight = platform.window:height()
 
     theHeight = platform.window:height()
Line 15: Line 15:  
</source>
 
</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]] methods.
+
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]]
 
[[Category:Events]]

Navigation menu