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.
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.
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.
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.