Skip to content

TScrollBar's fly away, when an other TWindow becomes the focus. #128

Answered by magiblot
paule32 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Jens,

The disappearing scrollbars are a design feature of Turbo Vision. In your case, the logic that is being applied is in TEditor::setState and TListViewer::setState. These methods hide or show the scrollbars on purpose.

In order to change this behaviour, you should override these methods in your own subclass. I believe the simplest solution may be to always call the show() method on the scrollbars, like this:

void TMyEditor::setState(ushort aState, bool enable)
{
    TEditor::setState(aState, enable);
    if (hScrollBar)
        hScrollBar->show();
    if (vScrollBar)
        vScrollBar->show();
}

void TMyListBox::setState(ushort aState, bool enable)
{
    TListBox::setState(aState…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@paule32
Comment options

@paule32
Comment options

Answer selected by paule32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants