Created
January 29, 2023 15:19
-
-
Save loudoweb/bdac906597339a7d2dc2c3d6facac65c to your computer and use it in GitHub Desktop.
Here is a test of the Feather UI scroller that doesn't prevent PopUpListView to open when scrolling. Because when clicking on the button, the scroller doesn't know yet it gonna scroll.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
import feathers.data.ArrayCollection; | |
import feathers.layout.VerticalLayout; | |
import feathers.layout.VerticalLayoutData; | |
import openfl.display.Sprite; | |
import openfl.Lib; | |
import feathers.events.ScrollEvent; | |
import feathers.controls.ScrollContainer; | |
import feathers.controls.PopUpListView; | |
class Main extends Sprite | |
{ | |
public function new() | |
{ | |
super(); | |
var container = new ScrollContainer(); | |
container.height = stage.stageHeight; | |
addChild(container); | |
var fc = new PopUpListView(); | |
fc.y = 300; | |
fc.layoutData = new VerticalLayoutData(100); | |
fc.dataProvider = new ArrayCollection([ | |
{ text: "Please Select" }, | |
{ text: "test1" }, | |
{ text: "test2" }, | |
{ text: "test3" } | |
]); | |
fc.itemToText = (item:Dynamic) -> { | |
return item.text; | |
}; | |
container.addChild(fc); | |
var fc2 = new PopUpListView(); | |
fc2.y = 2200; | |
fc2.layoutData = new VerticalLayoutData(100); | |
fc2.dataProvider = new ArrayCollection([ | |
{ text: "Please Select 2" }, | |
{ text: "test1" }, | |
{ text: "test2" }, | |
{ text: "test3" } | |
]); | |
fc2.itemToText = (item:Dynamic) -> { | |
return item.text; | |
}; | |
container.addChild(fc2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment