|
-
Dec 3rd, 2002, 03:55 AM
#1
Thread Starter
Lively Member
*Resolved* shrinking text inside a fixed size label :(
Hi All,
I'm wanting to do something a bit different and shrink the text within a fixed size label.
I'm using the following code to shrink the text (using ARIAL 72 point initially), but it only works when I've printed something first.
Otherwise it doesn't work at all.
Even if something has been printed, it isn't exactly perfect.
The problem is really bad when there are spaces in the text.
Perhaps a way without using the printer??
Can someone help.
Regards
Chris B
--------------------------------------------------------------------------
shrinktry = 100
While Printer.TextWidth(TextData(Y).Caption) > TextData(Y).Width And shrinktry > 0
Printer.Font.Size = Round(Printer.Font.Size) - 1
shrinktry = shrinktry - 1
Wend
Last edited by cboffsite; Dec 3rd, 2002 at 05:04 AM.
-
Dec 3rd, 2002, 05:06 AM
#2
Thread Starter
Lively Member
I worked it out,
by passing all the label attributes to the form and using the form's textwidth attribute I can work it all out.
Regards
Chris B
-
Dec 3rd, 2002, 05:10 AM
#3
for a start you can use a standard picturebox in place of the printer, next make sure that ALL font properties are the same (font name/style, size, bold, underline, etc.)
-
Dec 3rd, 2002, 05:11 AM
#4
oh well, too slow!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|