I'm buffering blocks of text in a text object. I reset the buffer, loading a
new group of text into the text buffer and setting the top visible line, this
way:
FldSetTextHandle(fld, recHandle);
FldSetSelection(fld, 0, 0);
FldSetInsertionPoint(fld, 0);
InsPtEnable(false);
FldSetScrollPosition(fld, scrollPos);
scrollPos is not zero; in the specific case I've examined closely, scrollPos
is 1797. The problem is that, on rare but repeatable occasions, the displayed
result jumps two lines closer to the start of the text than expected. I have
examined memory with a debugger just before the call to FldSetScrollPosition
and found that scrollPos is set to point to the start of the line I expect,
but after the call, the line I expected to be at the top of the display is
actually line 3, rather than 1.
Has anyone seen this sort of problem? Is there a known work-around, or
something I should be doing to initialize the text object that I've failed to
do? (I did try a call to FldRecalculateField; this did not help.)
Mike Westerfield