Wednesday, September 7, 2005

Tip of the Day: Using SCALEBY Property in Forms
Section: Forms
Supported Versions:
    . R:BASE 7.5 (Build: 7.5.16.30907 or higher)
    . R:BASE V-8 Turbo (Build: 8.0.12.0907 or higher)

Did you know that you can scale the form and all placed control
dynamically to fit the screens with higher resolution?

You may use the PROPERTY RBASE_FORM SCALEBY 'nnnn' command to
automatically scale form and all related controls to specified
screen pixel width.

SCALEBY property modifies the Height and Width properties of the
form and all controls placed on it, but it does not change the
Top and Left properties; therefore, the size of the controls
changes, but not the coordinates of the top-left corners of the
controls. Thus, it preserves the position of all controls on the
form.
        
If you have developed a form that is 800x600 for the majority
of users having a monitor with 800x600 screen resolution to fit
the form on the entire available screen, but a few users of your
application have a higher resolution (1024x768) and if you wish
your 800x600 form to fill the entire screen of a monitor with a
resolution of 1024x768, you'll need to use the RBASE_FORM SCALEBY
property as follows:

PROPERTY RBASE_FORM SCALEBY '800'
RETURN

This will scale the original form designed as 800x600 to fill
the entire screen even if the screen resolution is higher than
800x600, such as, 1400×1050, 1280x800 or 1024x768.

Notes:

. Use the SCALEBY property as embedded custom EEP in
  "On After Start EEP" in form
                
. To take advantage of this feature, make sure that you use the
  scaled true type fonts for all controls on that form

A sample form to demonstrate the use of SCALEBY property in forms
(R:BASE 7.5 and V-8 Turbo) is also available at:

http://www.razzak.com/sampleapplications (#034)

Enjoy and make sure to have fun!

Very Best R:egards,

Razzak.

Reply via email to