c_dw_vscroll_4


Ancestor

UserObject

Library

pbcommon.pbl

Description

This object is used to replace the standard DW Vscroll bar with a VScroll bar with a left and right scroll.

Usage

This object is used in place of a DW where you are limited for space and do not want to use a HScrollbar as it will use too much real estate, but would still like the user to be able to scroll left and right.

You will need to connect the resize event of your window/DW to this control. If you resize the DW Control that is associated with this control then trigger the resize event in this control. When the rowcount of the DW is changed, call the changedrowcount function on this object. When the row focus is changed, call the rowchanged function on this object.

Model

c_dw_vscroll_4
Protected:
Datawindow idw_DW
Long il_Header
Long il_Footer
Long il_Detail
Long il_VisRows
Boolean ib_PB
(none) changedrowcount ()
integer init (datawindow adw_dw)
integer init (datawindow adw_dw, boolean ab_pb)
(none) rowchanged ()
(none) scrollleft ()
(none) scrollright ()

Functions


changedrowcount

Description Call this function when the rowcount of your datawindow changes. This allows the scroll bar to be resized based upon the number of rows.

Return (none)


Access public

Arguments (none)
Usage (none)


init

Description Overloaded version to defualt the ab_PB value to FALSE which is how the control used to work before the new version.

Return integer


Access public

Arguments
Argument DataType Description
adw_dw datawindow Datawindow to scroll.

Usage (none)


init

Description Call this function to setup the control. This function will query the datawindow and load the size of the header, footer and detail band into working variables

Return integer
  • 1, Control initialised ok
  • -1, Initialisation failed

  • Access public

    Arguments
    Argument DataType Description
    adw_dw datawindow Datawindow to control.
    ab_pb boolean Should scroll bar minimc the PB behaviour of not altering the row focus when scrolled or should the rowfocus change when scrolled.

    Usage ll_RC = udw_scroll.Init( dw_1 )


    rowchanged

    Description Call this function from the datawindow rowfocus changed event.

    Return (none)


    Access public

    Arguments (none)
    Usage (none)


    scrollleft

    Description This function Scrolls the DW left one column.

    Return (none)


    Access public

    Arguments (none)
    Usage this.ScrollLeft()


    scrollright

    Description This function Scroll the DW right one column.

    Return (none)


    Access public

    Arguments (none)
    Usage this.ScrollRight()

    Events


    resize

    Description Trigger this event when the datawindow is resized.


    See Also

    (none)


    Generated by PB2HTML. ( Unregistered Version )