Home General

TppViewer hide scroll bars

edited July 2011 in General
Greetings,
In reference to the post on 9/11/2010 I would like to used skinned
scroll bars as well. The TppViewer.UpdateScrollBars procedure is called
which sets the scroll bars to visible after I set visible to false.

I can subsequently hide them again, but I get flickering.

Is there a way, through a descendant class or some other property that I
can prevent the scroll bars from ever being made visible?

Comments

  • edited July 2011
    Hi Michael,

    The UpdateScrollbars is a protected routine. Creating a simple
    descendent to the TppViewer class and overriding the routine would
    likely be the easiest way to accomplish what you need.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2011
    Nico,

    There are two more issues. First, the UpdateScrollBars method is static
    so I cannot override it. When I just replace it, it is never called. I
    am not the best at inheritance but it seems to me that if
    UpdateScrollBars is called from a method in the ancestor it will not
    call the descendant method ... is this correct?

    Another issue is that when the scroll bars are not visible setting the
    scroll bar position manually will not cause the page image to scroll. I
    cannot find another way to scroll the image without altering the
    position property of the scroll bars.

    My solution was to check to see if the scroll bars were visible each
    time the component was resized or refreshed and then make the TppViewer
    a little larger than the containing panel so the scroll bars would be
    underneath the new scroll bars and thus hidden. This works great except
    that the "old" scroll bars are briefly visible when the user resizes the
    window.

    This solution will work, but if you can come up with a more elegant
    option I will give it a try.

    Thank you.
  • edited July 2011
    Hi Michael,

    I apologize, I did not notice that the UpdateScrollBars routine was not
    virtual.

    I believe the issue is that the viewer was not designed to have the
    scrollbars replaced. It uses a TScrollBox and relies on its built-in
    scrolling of that control to scroll around report pages. I will mark
    this down as something that could possibly be improved in the future.
    Thanks for your feedback.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.