# ScreenWidthEvent(c:C, ev:EventHandler) hash function
Valid for use with hash command: HMI Arguments may be specified as Name:Value Pairs
Implemented on the following platforms: Android, Windows
C is an integer number of characters.
Lets you set the screen width to c characters across. SimpleHMI will determine the largest character size that will fit the required number of characters across the screen. This will not be able to use the full width of the screen if C is not divisible into the pixel width of the screen. For example, an Android phone with 320 pixels across will fill the width if C=32 or C=40, but not if C=30.
The number of character rows available is a function of the device (phone, tablet, PC) and its screen aspect ratio. The SimpleHMI function in SPLat/PC attempts to estimate this for a typical Android device, but it is impossible to be 100% sure it will always be correct due for example to different versions of Android and manufacturer-specific attributes.
An Event is raised when the device acknowledges this command. Your SPLat program should use that to trigger a re-draw of the screen (the screen is not redrawn automatically).
Example:
# HMI ScreenWidthEvent(40, evSetWidth)