RTF control from lebans : Resize from content on a form instead of a report

  • Thread starter Thread starter François Uldry
  • Start date Start date
F

François Uldry

All,

What would be the best way to properly resize the size of a control based
upon the Lebans RTF control on a form ?

I know it does support auto resize on a report, is there an easy way to
convert the unit used on the reports on the unit used on forms ?

Any clue which does not involve overly complex calls to DLLs :P ?

Thanks for your time,
Francois Uldry
fuldry (at) hors - la - loi dot ch
(properly replaces the bad characters by the correct one to reach me)
 
What's wrong with how resizing is accomplished in the form in the sample MDB
you downloaded?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
In the A2K RTF2 Sample You mean ?

Well, on the first impression, autoresizing did not work.

After making the control smaller, it did not work.

And after checking the form's oncurrent, it did work.

BUT, why is there a scroll bar inside the control ? This is rather ugly...

OK, I stand corrected, it indeed shows the correct size, my error...

Corrected code should read though :

Dim intHeight As Integer
intHeight= Me.RTFcontrol.Object.RTFheight + 100
If intHeight> 0 Then
If intHeight< 32000 Then
Me.RTFcontrol.height = intHeight
Else
Me.RTFcontrol.height = 12000 ' Or more
End If
End If

Me.Section(acDetail).height = intHeight + Me.RTFcontrol.Top + 15


The + 100 allows the control not to show the lateral scrollbar.
The +15 on the detail section, allows access to show the internal border of
the control :)

Thanks for your time,
Take care,
Francois Uldry
fuldry (at) hors - la - loi dot ch
(properly replaces the bad characters by the correct one to reach me)
 
Back
Top