-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I’m trying to add horizontal and vertical scrollbars in a list, but only the vertical scrollbar works. The horizontal scroll bar is visible but does not move with the mouse (example below).
| list hBar vBar |
list := ToListElement new nodeBuilder: [ :node :dataItem :holder | | e |
e := BlElement new size: 1000@200.
e background: Color random.
node addChild: e ].
list dataAccessor addAll: { 1.2.3.4.5.6.7.8.9 }.
hBar := BlHorizontalScrollbarElement new
constraintsDo: [ :c |
c ignoreByLayout.
c ignored vertical alignBottom ];
yourself.
hBar thumb: (BlElement new
height: 16;
geometry: (BlRoundedRectangleGeometry cornerRadius: 10);
background: Color blue;
yourself).
hBar track background: Color transparent.
hBar zIndex: 100.
hBar attachTo: list next.
vBar := BlVerticalScrollbarElement new
constraintsDo: [ :c |
c ignoreByLayout.
c ignored horizontal alignRight ];
yourself.
vBar thumb: (BlElement new
width: 16;
geometry: (BlRoundedRectangleGeometry cornerRadius: 10);
background: Color blue;
yourself).
vBar track background: Color transparent.
vBar zIndex: 100.
vBar attachTo: list next.
list addChild: hBar.
list addChild: vBar.
list openInSpace
Metadata
Metadata
Assignees
Labels
No labels