FXScrollbar

The scroll bar is used when a document has a larger content than may be made visible. The range is the total size of the document, the page is the part of the document which is visible. The size of the scrollbar thumb is adjusted to give feedback of the relative sizes of each. The scroll bar may be manipulated by the left mouse (normal scrolling), right mouse (vernier or fine-scrolling), or middle mouse (same as the left mouse only the scroll position can hop to the place where the click is made). Finally, if the mouse sports a wheel, the scroll bar can be manipulated by means of the mouse wheel as well. Holding down the Control-key during wheel motion will cause the scrolling to go faster than normal. While moving the scroll bar, a message of type SEL_CHANGED will be sent to the target, and the message data will reflect the current position of type FXint. At the end of the interaction, the scroll bar will send a message of type SEL_COMMAND to notify the target of the final position.


FXScrollbar(p, tgt=None, sel=0, opts=SCROLLBAR_VERTICAL, x=0, y=0, w=0, h=0)

Construct scroll bar.

ArgumentTypeDefaultDescription
pFXComposite  
tgtFXObjectNone 
selInt0 
optsIntSCROLLBAR_VERTICAL 
xInt0 
yInt0 
wInt0 
hInt0 


getBorderColor()

Change border color.


getDefaultHeight()

Return default height.

Reimplemented from FXWindow.


getDefaultWidth()

Return default width.

Reimplemented from FXWindow.


getHiliteColor()

Return highlight color.


getLine()

Return line increment.


getPage()

Return page size.


getPosition()

return scroll position


getRange()

Return content size range.


getScrollbarStyle()

Change the scrollbar style.


getShadowColor()

Return shadow color.


setBorderColor(clr)

Return border color.

ArgumentTypeDefaultDescription
clrFXColor  


setHiliteColor(clr)

Change highlight color.

ArgumentTypeDefaultDescription
clrFXColor  


setLine(l)

Set scoll increment for line.

ArgumentTypeDefaultDescription
lInt  


setPage(p)

Set viewport page size.

ArgumentTypeDefaultDescription
pInt  


setPosition(p, notifyTgt=False)

Change current scroll position.

ArgumentTypeDefaultDescription
pInt  
notifyTgtBoolFalse 


setRange(r)

Set content size range.

ArgumentTypeDefaultDescription
rInt  


setScrollbarStyle(style)

Get the current scrollbar style.

ArgumentTypeDefaultDescription
styleInt  


setShadowColor(clr)

Change shadow color.

ArgumentTypeDefaultDescription
clrFXColor  


Global flags

Scrollbar styles

SCROLLBAR_HORIZONTAL

Horizontally oriented.

SCROLLBAR_VERTICAL

Vertically oriented.