Add a function to Scrollbar?

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

lcy03406
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Fri Apr 24, 2009 01:18

Add a function to Scrollbar?

Postby lcy03406 » 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. :D

LCY.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Add a function to Scrollbar?

Postby CrazyEddie » Sat Oct 17, 2009 09:04

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.

TBH, I thought we already had this. Which means either that I thought about this a long time ago and never implemented it, or that my mind is gone :mrgreen:

lcy03406 wrote:Or add a 'FixToBottom' property. :D

I'll consider this. My first though was that this is a good idea and my second thought contained lots of reasons not to do it - so I'll take some time to ponder on it some more...

CE.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Add a function to Scrollbar?

Postby CrazyEddie » Sun Feb 21, 2010 19:31

Both the single update function:

Code: Select all

    void setConfig(const float* const document_size,
                   const float* const page_size,
                   const float* const step_size,
                   const float* const overlap_size,
                   const float* const position);


And a new 'end lock' mode:

Code: Select all

functions:
    void Scrollbar::setEndLockEnabled(const float enabled);
    bool Scrollbar::isEndLockEnabled() const;

Boolean Property:
    "EndLockEnabled"


Have been added to Scrollbar in branches/v0-7.

CE.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 7 guests