ianharrigan / haxeui

IMPORTANT NOTE! This repository is no longer maintained. Please consider the newer version: https://github.com/haxeui/haxeui-core
http://haxeui.org/
392 stars 46 forks source link

ListSelector spawning menu far from button #350

Open KnightMearh opened 8 years ago

KnightMearh commented 8 years ago

lime 2.9.1 openfl 3.6.1 actuate 1.8.6 hscript 2.0.5 haxeui 1.8.17 target: HTML5 (haven't tried mobile yet)

ListSelector always seems to imply "popup" mode. When I click the button, it spawns a list at 0,0 (partially offscreen). Each time I click the button, it spawns a new instance of the list at 0, 0. For each spawned list, when I select an option, it does dismiss and properly update the main dropdown button. Alternately, if I try to use DropDownList, it has the exact same effect as ListView. Are they different?

var drop:ListSelector = new ListSelector();
drop.method = "default";
drop.x = 200;
drop.y = 200;
drop.width = 200;
drop.height = 50;

for ( n in 0...20 ) {
    drop.dataSource.add( { text:"item"+n } );
}
ianharrigan commented 8 years ago

There are issues with version 1 of haxeui in that it doesnt work correctly for the HTML5 target. Some things work fine, but anything that has a scrollrect doesnt unfortunately. Its worth mentioning that V2 doesnt have this limitation.