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
Re: RichText scrolling problem [message #25369 is a reply to message #25364] Fri, 19 February 2010 12:28 Go to previous messageGo to previous message
javelin is currently offline  javelin
Messages: 3
Registered: November 2009
Junior Member
Woops there's a bug in my code. When initializing _sbConst I was assuming that tsb will always be bigger than the page size. The code below corrects this:

int sb = output_.GetSb(), tsb = output_.GetSbTotal();

output_ <<= ~output_ + qtf;

if (!_sbConst) {
    output_.ScrollEnd();
    sb = output_.GetSb();
    tsb = output_.GetSbTotal();
    if (tsb > sb && tsb > output_.GetSbPage())
        _sbConst = tsb - sb;
} else {
    if (abs(tsb - sb) != _sbConst) output_.SetSb(sb);
    else output_.ScrollEnd();
}


But this now requires that ScrollBar::GetPage() be exposed as RichTextView::GetSbPage(). Sad Can we do this guys?

Mark
 
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: Mon Apr 29 19:17:36 CEST 2024

Total time taken to generate the page: 0.02852 seconds