Skip to content

Horizontal scrollbar not working on list #205

Description

@LouisePla

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 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions