A very quick over view...
Set a variable that contains the entire line. Such as
vCSZ = (ShipCity + ',' & ShipState & ShipZip)
If the Before Generate EEP...
Set var vCSZLength = (SLEN(.vCSZ))
If vCSZLength > 50 then
Property CSZ Font_Size 10
else
Property CSZ Font_Size 12
Endif
You would need to do the above for each line on your label.
The above simple sample assumes the line for City, State and Zip
has a component ID named CSZ. The 50 is just a number I used
for example. You would need to determine the maximum character
count your label line will hold with the default font and font size.
As the data is ran, the font size can be adjusted on the fly.
You can even change font type, under line, italics etc. on the fly.
You might want to consider using REPORTS instead of LABELS
to create the labels. You have more control and features.
Hope this helps. It is one way of achieving your goal.
-Bob
----- Original Message -----
From: "Thomas J Hawley" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Monday, May 17, 2010 7:48 PM
Subject: [RBASE-L] - Label Design Issues (Shrink to Fit)
Razzak, I'm aware of the new "suppress blank lines" property and that
works fine; it's much easier to implement than the old solution which
required a lot of code.
But I don't understand how the FONT_SIZE property could be used to
implement a "shrink to fit" capability. If the line's too long you
can of course use FONT_SIZE to make it shorter by reducing the font
size. But how do you determine that the line is too long and needs to
have its font size reduced? In other words, how do you check for and
determine the existence of an overflow condition?
Any guidance would be much appreciated. It would be great to have our
entire workflow within R:Base so we wouldn't have to deal with Avery
DesignPro.
Tom Hawley
On Sun, May 16, 2010 at 5:48 PM, A. Razzak Memon <[email protected]> wrote:
At 12:50 PM 5/16/2010, Thomas J Hawley wrote:
So far as I am aware, R:Base cannot do both blank line suppression
and shrink to fit at the same time, and Autosize is not the same
thing as shrink to fit in any case. (I make these statements with
the usual expectation on this list that I might be about to learn
something.)
Tom,
Get ready to learn something ...
Did you know that the "Suppress Empty Lines" property was added on
November 2, 2009 with the release of R:BASE 7.6 (Build:7.6.8.31102),
and R:BASE Turbo V-8 (Build:8.0.22.31102)?
FYI, an additional "Suppress Empty Lines" property was added for the
Variable Memo control. This allows for an easy solution to display
address labels and eliminate blank lines by containing the address
in one long text string, combined with carriage returns.
Label Designer |Variable Memo Control| Right-Click|Properties ...
Report Designer |Variable Memo Control| Right-Click|Properties ...
In reference to "Shrink to Fit", you can take advantage of
dynamically controlling the "Font Size" based on printable space
using the PROPERTY <CompID> FONT_SIZE nn command.
Remember, we are only limited by our in-depth knowledge and the
currently used version of R:BASE!
Nothing is impossible!
Very Best R:egards,
Razzak.
P.S.
If you need a sample to demonstrate the use of such features in
the latest updates of R:BASE 7.6, Turbo V-8, and R:BASE eXtreme
9.0, please let me know. I can prepare a sample, contingent to
my time availability.