PtMultiText circular buffer


I would like to display only the latest 1000 lines in PtMultiText widget of some continuous logs ,while logging is happening.i.e if I scroll up ,I should be able to see the latest 1000 logs,eventhough lot of logs has happened early.
Other previous logs should not be there.Is there any way to do this.

Thanks in advance

Roby Varghese

It’s not a feature of the MultiText widget, but you can implement it programatically. On a recent project I had to do something similar. The tricky part was to keep the data scrolled right. When scrolled to the end the user wanted new data to appear. When the user scrolled up, the data had to be be static, not jump to the bottom when new data appeared. Also we had Top, Bottom, Page Up + Down and single Up + Down keys.

I didn’t use MultiText, instead I used multiple label widgets. The Text and MultiText widgets make more sense if you want the user to be able to edit the data.

Did you intend to just quote the previous post, or did you have another question?

I have fixed the problem by deleting the first line by calling
PtMultiTextModifyText(ABW_PtMultiTextLogView,0,s32_message_length,-1, NULL,
,when the line count crosses 1000. So only last 1000 lines appear in the ptMultiText buffer.

Now a new problem.

When I call PtMultiTextModifyText to delete the first line the scroll bar also move up.and then again a log
is coming at the end the scroll bar moves down ,so the filckering of scroll bar happening.

Is there any way to avoid this?

I think of disabling the scroll bar when deleting the first line to avoid the flickering effect.But I dont know how to disable the scroll bar.
How to disable and enable the scroll bar programatically?

Thanks in advance