Hi,
I'm evaluating the TextDynamic OCX for my software. Basically, we have our own form generation software that currently uses a RichTextBox, but we would like to add more functionality. My hope was to use the TextDynamic control as a replacement. What I don't want to have to do is redesign our form system completely in TextDynamic, just use the control to simulate a textarea on a page.
Our forms have 2 pages for layout - page 1 and page 2+. The text area for page one is a certain size & position (i.e. 7 inches wide by 3 inches tall) and the text area for pages 2 and up is a different size and position (i.e. 7.5 inches wide by 8 inches tall). Only one page gets show at a time for entry. I have been able to simulate this by putting the TextDynamic control in a PictureBox and changing the .Top property to simulate switching from page 1 to 2 to 3, etc... by tracking page changes in the OnChangePosition event.
Of course, since I don't want the TextDynamic control to represent a whole page (just the text area that goes onto our form), I set the LayoutMode to wplayNormal. The problem is that it seems that the word wrapping for the control stays at the page 1 width even when you are one page 2. I'm just wondering if I am doing something wrong, or if there is a bug? Here's a stripped down example to illustrate the bug:
Place a TextDynamic control (WPDLLInt1) and a CommandButton (Command1) on a form, then add this code:
Private Sub Command1_Click()
With Me.WPDLLInt1
.CurrMemo.AutoZoom = wpAutoZoomOff
.CurrMemo.LayoutMode = wplayNormal
.CurrMemo.PageSizeList.Add Me.ScaleX(3, vbInches, vbTwips), Me.ScaleX(3, vbInches, vbTwips)
.CurrMemo.PageSizeList.Add Me.ScaleX(5, vbInches, vbTwips), Me.ScaleX(5, vbInches, vbTwips)
.CurrMemo.PageSizeList.Active = True
.CurrMemo.ReformatAll True, True
End With
End Sub
Now start the project and click the CommandButton. Then start typing wide text. Everything looks and wraps fine on page 1, but when you get to page 2 the wrapping will still be at page 1 width even though the ruler shows that the page width is wider. Any ideas?