Class: ScrollablePanel

ScrollablePanel()

new ScrollablePanel()

A panel that can contain child elements and allows vertical scrolling if the content height exceeds the panel height.
Source:

Extends

  • BaseUIElement

Members

children :Array.<BaseUIElement>

Type:
  • Array.<BaseUIElement>
Source:

ScrollablePanel(options)

new ScrollablePanel(options)

Creates an instance of ScrollablePanel.
Parameters:
Name Type Description
options object Configuration options.
Properties
Name Type Attributes Default Description
x number <optional>
0 The x-coordinate.
y number <optional>
0 The y-coordinate.
width number <optional>
200 The width of the panel.
height number <optional>
150 The height of the panel (viewport height).
backgroundColor string <optional>
null Background color.
borderColor string <optional>
'gray' Border color.
borderWidth number <optional>
1 Width of the border.
padding number <optional>
5 Inner padding for content.
scrollbarWidth number <optional>
10 Width of the scrollbar.
scrollbarTrackColor string <optional>
'#333' Color of the scrollbar track.
scrollbarThumbColor string <optional>
'#888' Color of the scrollbar thumb.
scrollbarThumbHoverColor string <optional>
'#AAA' Color of the scrollbar thumb on hover.
mouseWheelSensitivity number <optional>
20 Pixels to scroll per mouse wheel event.
Source:

Members

children :Array.<BaseUIElement>

Type:
  • Array.<BaseUIElement>
Source: