Built-in macros: $ScreenSize

The $ScreenSize macro is replaced by the value specified in the ScreenSize attribute of the profile the code is currently compiled for.




This macro results in a point literal. The original attribute ScreenSize determines the size in pixel of the display in the target device. For example, if the display is configured to have 320x240 pixel size, the macro results in following value:


The macro $ScreenSize can be used inside a regular Chora expression wherever a point operand is allowed. For example, you can use the macro to adjust the size of a view so it fills the entire display area:

SomeView.Bounds.size = $ScreenSize;
OtherView.Bounds.w   = $ScreenSize.x;