Add a function to Scrollbar?
Posted: Sat Oct 17, 2009 03:35
The problem is, I want the thumb fix to the end, even when the ducument size grows. In fact, I'm making a floating-up textbox, adding a blank line every seconds.
I wrote this in updateSelf of my textbox class:
bar->setDocumentSize( docSize );
bar->setScrollPosition( docSize - bar->getPageSize() );
The thumb button will 'move' twice, calculate the area twice, and invalidate itself, but actually it does not move at all.
I think it is better adding a function to Scrollbar changing the document size and scroll position at the same time, and calculate the area only once.
Or add a 'FixToBottom' property.
LCY.
I wrote this in updateSelf of my textbox class:
bar->setDocumentSize( docSize );
bar->setScrollPosition( docSize - bar->getPageSize() );
The thumb button will 'move' twice, calculate the area twice, and invalidate itself, but actually it does not move at all.
I think it is better adding a function to Scrollbar changing the document size and scroll position at the same time, and calculate the area only once.
Or add a 'FixToBottom' property.
LCY.