tips
[Top] [All Lists]

REALbasic Tip: Using formulas in the Properties window

To: "REALbasic Tips" <realbasic-tips at lists dot realsoftware dot com>
Subject: REALbasic Tip: Using formulas in the Properties window
From: Geoff Perlman <geoff at realsoftware dot com>
Date: Thu, 16 Jan 2003 10:16:43 -0600
Ever had to calculate the value you were about to enter into the Properties
window? For example, if you wanted to double the width of a control in a
window, you would have to do the math yourself and then enter the value.

In REALbasic v4.5 you can enter the formula directly into the Properties
window. REALbasic will then replace the formula with the result. Try this:

1. Click on a control to select it.
2. In the Width property, type '*2'  (without the quotes) and press the
Enter key.

The width is now twice what it was before. You can use complex calculations
as well. The Properties window supports addition, subtraction,
multiplication, power (^), and mod (%). You can also use the names of
properties as well. For example, if you wanted the width to be Left + 10 you
would simply enter 'Left + 10' in the Width property and press the Enter
key.

This tip was suggested by Jason Parsley here at REAL Software.
-- 
Geoff Perlman
President and CEO
REAL Software, Inc.
512-328-7325 x711 (voice)
512-328-7372 (fax)


 - - - - - - - - - -
Got a useful tip to share? Send it to us at:
REALbasic-tips at lists dot realsoftware dot com dot 

To unsubscribe from the Tips list, send an email to 
<mailto:realbasic-tips-off at lists dot realsoftware dot com>

<Prev in Thread] Current Thread [Next in Thread>
  • REALbasic Tip: Using formulas in the Properties window, Geoff Perlman <=