Max regarding the ability to resize the control based on its contents
have looked at:
1) The sample Reports included with the control
2) The RTF2 Web page:
http://www.lebans.com/richtext.htm
specifically:
http://www.lebans.com/richtext.htm#ResizingCode
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
> Hi All,
> I'm using Stephen Lebans RTF2 control to do letters and labels in
my
> app. I'm very pleased with it.
>
> I have one RTF2 control on a form, where the letter can be
formatted,
> and fields inserted. When the "Print Preview" button is pushed, I do the
> replacements, creating a temp table of merged letters (ala Duane Hookom).
> When the report is opened, it just accesses this table, with each record a
> different letter. When the report is closed, the table is emptied.
>
> Okay, so... the report consists of a single RTF2 control, sized
to
> 7 1/2 x 10. As long as no one cares about the page layout, it's adequate.
> The problem is that anything not fitting in the 7 1/2 by 10 control is
[quoted text clipped - 11 lines]
>
> - Max
Max Moor - 18 Sep 2004 04:02 GMT
"Stephen Lebans" <ForEmailGotoMy.WebSite.-
WWWdotlebansdotcom@linvalid.com> wrote in news:#74KiqPnEHA.536
@TK2MSFTNGP11.phx.gbl:
> Max regarding the ability to resize the control based on its contents
> have looked at:
[quoted text clipped - 13 lines]
> Access Code, Tips and Tricks
> Please respond only to the newsgroups so everyone can benefit.
Hi Stephan,
That does help. I glossed right over the code in the sample DB
and didn't see it. Sorry about that.
I am curious... I see the height is taken from the
Object.RTFheight property of the control. Is this height of the actual
text, then? In twips? Also, could you tell me where the 32000 limit
comes from? So much to learn. :-)
Thanks, Max
P.S.
I thought I'd mention that I poked around your site, and saw your
kids pics. I have two girls in basketball also. They are in 5th and
7th grades now. The eldest just turned 13, and is about 5' 9". (I'm
6' 6", so she comes by it honestly at least.)
I noted that the pics were from 1999. Was your oldest 12 then?
I'm just curious how tall she is now, 5 years later? I love to threaten
my 5' 4" wife that ours will end up at 6' even. She towers over her
mama as it is. :-)
Stephen Lebans - 18 Sep 2004 14:10 GMT
The 32K limit is tied to the older 16bit limitation of the Windows
Graphics Device Interface(GDI). I'm sure years ago the designers at MS
never envisioned anyone needing to describe a single view larger than
22.75 inches(32K/1440 Twips per Inch). Yes 32K is half of the 16Bit max
value(64K) but we are describing only the postive portion of a signed
integer.
For the majority of report page design issues the 32K limit is
irrelevant. But for ActiveX controls it is a serious limitation.You
cannot programmatically set the height of any ActiveX or instrinsic
Access control to a value greater than 32K Twips.
Now on to more important matters<grin>. My oldest daughter Alyssa is now
17 and seems to be finished growing at a final height of 5'10". I'm 6'3"
but my wife is only 5'5". My youngest was very late with her growth
spurt. SHe is now 15 years old and 5'6" tall but she hopes to add
another few inches. They both wish I had of married someone
taller!<grin>
:-)
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
> "Stephen Lebans" <ForEmailGotoMy.WebSite.-
> WWWdotlebansdotcom@linvalid.com> wrote in news:#74KiqPnEHA.536
[quoted text clipped - 39 lines]
> my 5' 4" wife that ours will end up at 6' even. She towers over her
> mama as it is. :-)
Max Moor - 19 Sep 2004 07:47 GMT
"Stephen Lebans" <ForEmailGotoMy.WebSite.-
WWWdotlebansdotcom@linvalid.com> wrote in news:OhED#CYnEHA.592
@TK2MSFTNGP11.phx.gbl:
> The 32K limit...
Cool. That all makes sense. I got all the sizing stuff working
just fine. Thanks for the help.
If I haven't worn out my welcome, I ran into a couple other issues
with RTF2. The first I'll just tell you about for anecdotal purposes.
Maybe you can help with the other?
So, I think I mentioned that I use RTF2 as a merge tool. The user
types his letter, and can insert field names enclosed in <>. Just
before I open the report, I do a Replace in each record's RTF string for
the field names, and replace them with that records actual data.
This works fine, except where the actual data includes a carriage
return / linefeed (Chr$(13) & Chr$(10)). The CR/LF gets carried over
into the RTF string, but, of course. the "\par" isn't there, so when it
prints, there isn't a visible CR/LF.
I've made a work-around by checking my inserted data for a CR/LF,
and replacing it with "\par" & Chr$(13) & Chr$(10). It was an
interesting thing I never considered when I started with this. I
thought I'd tell you about it.
The one you might be able to help with is that I actually have two
merge reports: one for letters, and one for labels. Sometimes the RTF
on the labels report has spaces inserted where none exist. I can look
at the RTF string in the "merge table" and see "Dr. Joyce Williamson."
When it's dropped into the RTF2 control on the report, it comes out like
"Dr. J oyce Will iamson."
It doesn't seem to vary with the font, and doesn't seem tied to
capital letters or other specific character combinations. On the other
hand, it always does it the same way on the same records. My only other
data point just bugs me more. The spaces only show up on the label
report. The exact same merge and records look fine on the letters
report! Any thoughts?
TTFN, Max