haxeui / haxeui-core

The core library of the HaxeUI framework
http://haxeui.org
MIT License
345 stars 71 forks source link

ListView unclickable with haxeui-hxwidget #137

Closed elnabo closed 4 years ago

elnabo commented 7 years ago

Expected Behavior

Clicking an item of a ListView should trigger onItemClick.

Current Behavior

Nothing happen. onItemClick is bound to Mouse.CLICK which correspond to clicking on Button or similar. However the ItemRenderer are Label which doesn't generate such events.

Possible Solution

Steps to Reproduce (for bugs)

  1. Have a ListView with items
  2. Compile with haxeui-hxwidget
  3. Try to click on an item
ianharrigan commented 7 years ago

The thin im not sure about here is that, ideally, the list should be 100% native. The issue there then is that itemrenders wont work. It would be nice to be able to "detect" if you are using something more advanced that a BasicItemRenderer and then switch to a composite ListView, and if not, use standard wx version

ianharrigan commented 7 years ago

for example:

image

ianharrigan commented 7 years ago

Probably a better image: image

But it i think, in keeping with the "spirit" of haxeui it would better to use pure native components where possible. I think, that there should also be a way to work out if the itemrenderer is something more complex too, but ill look at that tomorrow.

ianharrigan commented 6 years ago

Is this still an issue with the latest master branch?