Skip navigation.
Home
The QNX Community Portal

View topic - PtMultiText circular buffer

PtMultiText circular buffer

Isn't the name clear?

PtMultiText circular buffer

Postby roby.2004 » Thu Aug 16, 2012 9:36 am

HI,

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

Regards
Roby Varghese
roby.2004
New Member
 
Posts: 4
Joined: Thu Aug 16, 2012 9:25 am

Re: PtMultiText circular buffer

Postby maschoen » Thu Aug 16, 2012 4:27 pm

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.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: PtMultiText circular buffer

Postby roby.2004 » Fri Aug 17, 2012 6:18 am

maschoen wrote: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.
roby.2004
New Member
 
Posts: 4
Joined: Thu Aug 16, 2012 9:25 am

Re: PtMultiText circular buffer

Postby maschoen » Fri Aug 17, 2012 1:30 pm

Did you intend to just quote the previous post, or did you have another question?
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: PtMultiText circular buffer

Postby roby.2004 » Mon Aug 20, 2012 2:35 pm

HI,
I have fixed the problem by deleting the first line by calling
PtMultiTextModifyText(ABW_PtMultiTextLogView,0,s32_message_length,-1, NULL,
s32_message_length,NULL,0);
,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

Regards
Roby
roby.2004
New Member
 
Posts: 4
Joined: Thu Aug 16, 2012 9:25 am


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 2 guests