Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » RichText scrolling problem
RichText scrolling problem [message #25362] Fri, 19 February 2010 04:51 Go to previous message
javelin is currently offline  javelin
Messages: 3
Registered: November 2009
Junior Member
Hi, my name's Mark and I've been lurking for a long time in this forum to my lasting shame. I'm currently involved in a mobile IM and chat project that has enjoyed moderate success here in my country. We also have a desktop version of our app made in wxWdigets and I hope to rewrite the whole stuff in U++ from the ground up. So far i've managed to do fairly well resulting to this:

http://4.bp.blogspot.com/_PkUv5qu-Esc/S34FpnPFIuI/AAAAAAAAADk/5dQIG1u-QTo/s1600-h/uzzap2.jpg

My question is this: My chat and IM views use the RichTextView controls and I need to scroll down to the very bottom every time a new message comes up only IF the view is already scrolled down to the bottom. If the user is viewing some back messages or he is not currently scrolled to the very bottom, the view should only scroll down to where the he was at before the new message came. I did this but I'm not satisfied because sometimes the view still scrolls one line down when it's not at the bottom:

int sb = output_.GetSb(), tsb = output_.GetSbTotal(), tsb2;
output_ <<= ~output + qtf;
tsb2 = output_.GetSbTotal();
_output_.SetSb(sb + abs(tsb2 - tsb));
_output_.BackPaint();


Could anyone suggest another and better (,perhaps easier) way to do this?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Default font and fontsize in RichEdit
Next Topic: Strange memory problem in QTF RichView
Goto Forum:
  


Current Time: Tue Apr 16 08:40:46 CEST 2024

Total time taken to generate the page: 0.01415 seconds