Sorry, I posted the incorrect code.
I knew VpeTextBlockSetWidth returns a void
The line for VpeTextBlockGetLineCount was missing
- Code: Select all
text := 'Long lines of text....'
hTextBlock := VpeCreateTextBlock(hDoc, text)
VpeTextBlockSetWidth(hTextBlock, 4.0)
? VpeTextBlockGetLineCount(hTextBlock) <-- returns 37
VpeWriteTextBlock(hDoc, hTextBlock, 1.0, 2.0, 5) <-- Writes 5 lines as expected
VpeWriteTextBlock(hDoc, hTextBlock, 5.5, 2.0, 5) <-- Writes 5 more lines as expected
VpeWriteTextBlock(hDoc, hTextBlock, 10.0, 2.0, 5) <-- Writes 5 more lines as expected
? VpeTextBlockGetLineCount(hTextBlock) <-- Still returns 37, shouldn't this be 22??
VpeTextBlockRelease(hTextBlock)
I will wait to hear what you find from your investigation into the non-RTF text blocks.
Thank you,