Below is an example of a program that creates/updates the "theHeight" ad "theWidth" global variables whenever the user resizes the widget's frame:
function on.resize() --Define a function for the
theWidth = platform.window:width()
theHeight = platform.window:height()
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.