Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Horizontal scroll not working? #15

Open
tinchodias opened this issue May 12, 2023 · 1 comment
Open

Horizontal scroll not working? #15

tinchodias opened this issue May 12, 2023 · 1 comment

Comments

@tinchodias
Copy link

largeElement := BlElement new
	size: 1000 asPoint;
	background: (BlRadialGradientPaint new
		stops: { 0 -> Color green . 1 -> Color red};
		center: 500 asPoint;
		radius: 500;
		yourself);
	yourself.
largeElement := largeElement asScrollableElement.

hBar :=
	BlHorizontalScrollbarElement new
		constraintsDo: [ :c |
			c ignoreByLayout.
			c ignored vertical alignBottom ];
		attachTo: largeElement;
		yourself.

scrollPane :=
	BlElement new
		addChild: largeElement;
		addChild: hBar;
		constraintsDo: [ :c |
			c horizontal matchParent.
			c vertical matchParent ];
		yourself.

space := BlSpace new.
space root
	layout: BlLinearLayout new;
	padding: (BlInsets all: 10);
	background: Color blue muchDarker;
	addChild: scrollPane.
space
	extent: 500@500;
	show.
@tinchodias
Copy link
Author

Screen.Recording.2023-05-12.at.16.06.14.mov

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant