Two new system functions allow you to zoom in, zoom out, and obtain the current zoom factor of controls in an application running on a Windows CE device or emulator. Table 1 describes the two new system functions. These functions are not designed to work on the desktop.
The current zoom factor that you set in a SetDisplayZoom call applies to all controls (when rebuild = true) or all newly instantiated controls (when rebuild = false) in an application. However, when rebuild = true, the sizes of the bitmaps for radio buttons, check boxes, and the edit boxes of drop-down lists are not changed by a SetDisplayZoom call unless they are used as display formats for columns in a DataWindow. When the same controls are placed on application windows, the sizes of these controls’ bitmaps are fixed by the Windows CE operating system and can be modified only by a SetDisplayZoom call before they are loaded.
Setting the zoom factor for windows with DataWindow
controls
The zoom value should be set before any dynamic changes are
made to the DataWindow content since changing the display zoom value
resets the DataWindow content.
The zoom factor is a percent of the size of the controls at design time. SetDisplayZoom works best for devices that have a VGA screen, such as the ASUS MyPal A730. The permissible zoom factor range is 10 to 500 percent. If you set a zoom factor outside of this range, PocketBuilder automatically resets the zoom factor to 100.
Although horizontal and vertical scroll bars are resized based on the zoom factor that you set in a SetDisplayZoom call, there is a threshold below which these controls cannot be painted. The threshold depends on the device resolution. For example, on a Dell Axim device with a 240 x 320 screen resolution, a scroll bar is not visible if its height is less than 28 pixels.
Drawing objects, such as lines and ovals, are automatically repainted with the current zoom factor when an action causes the application window to be refreshed. This occurs even if you called SetDisplayZoom with the rebuild argument set to false.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |