Skip navigation.
Home
The QNX Community Portal

View topic - To disable Pt_EMT_SCROLL_TO_CURSOR

Page 1 of 1

To disable Pt_EMT_SCROLL_TO_CURSOR

PostPosted: Mon Dec 31, 2012 1:22 pm
by Ram_89
Hi all,
I'm new in qnx photon programming.I would like to display only the latest few lines in PtMultiText widget of some continuous data.The scroll bar move up and down as I edit the content of the MultiText widget using PtMultiTextModifyText.
How can I keep the scrollbar position at bottom even I edit the first line.
I have disabled the Pt_EMT_SCROLL_TO_CURSOR but no effect.
Please help...

Re: To disable Pt_EMT_SCROLL_TO_CURSOR

PostPosted: Mon Dec 31, 2012 6:58 pm
by maschoen
Ram_89 wrote:Hi all,
I'm new in qnx photon programming.I would like to display only the latest few lines in PtMultiText widget of some continuous data.The scroll bar also move up and down as I edit the content of the MultiText widget using PtMultiTextModifyText.
How can I keep the scrollbar position at bottom even I edit the first line.
I have disabled the Pt_EMT_SCROLL_TO_CURSOR but no effect.
Please help...


I'm not clear on what you want. Do you want to keep the MultiText widget stationary at the bottom while a user enters data? or do you want to modify the widget data in code and then scroll down to the bottom? The first sounds unlikely, but you used the word "edit" which sounds like a user entering data.

Re: To disable Pt_EMT_SCROLL_TO_CURSOR

PostPosted: Wed Jan 02, 2013 3:55 am
by Ram_89
Thank you for your response,

I want to modify the widget data in code and then scroll down to the bottom.
If I enable Pt_EMT_SCROLL_TO_CURSOR and modify the widget data (delete top line and add new line at bottom), the scroll bar moves up and down.If I disable Pt_EMT_SCROLL_TO_CURSOR, the scroll bar is always at top line but I want it at last line.

Regards....
Ram.

Re: To disable Pt_EMT_SCROLL_TO_CURSOR

PostPosted: Wed Jan 02, 2013 4:10 am
by maschoen
Have you tried modifying the text and then modifying the Pt_ARG_MULTITEXT_Y_SCROLL_POS resource?

There are other resources that might help you decide what to set it to.

If all else fails you might want to put the widget inside a scroll container, and control the position using the scroll container's resources.