ListView itemrenderer and selection

Is there any more details on itemrenderer ? how does it work ? how to extend a itemrenderer class ?

Is there a specific way to declare/code them ?

because with a simple item renderer like this

   <item-renderer layoutName="horizontal" width="100%">
        <label id="name" width="100%" />
    </item-renderer>

selection on mouse is working only on the underline.
see this screenshot, only clicking on the orange section selects the line (OSX)

image

have you got latest haxeui-core / haxeui-hxwidgets / hxWidgets?

I feel like i fixed something yesterday that might cause this. This is my test listview btw:

    <listview width="100" height="100">
        <item-renderer layoutName="horizontal" width="100%">
            <label id="value" width="100%" />
        </item-renderer>
        <data>
            <item value="Item 1" />
            <item value="Item 2" />
            <item value="Item 3" />
            <item value="Item 4" />
            <item value="Item 5" />
            <item value="Item 6" />
            <item value="Item 7" />
            <item value="Item 8" />
            <item value="Item 9" />
        </data>
    </listview>

Im using xml, but ofc, you could use code too if you wanted.

Ian

I updated yesterday - but i should have tried to update again before posting

it’s fixed

thanks!

1 Like

does it work if you define selectedIndex on <listview …> ?

On my side (OSX), it does nothing, so I’m unable to pre select an item

Can you paste a minimal code example / project so i can just run it and see, its a pain sometimes creating a new project to try and match whatever you are doing, and sometimes i might not be matching it at all (since im guessing).

Cheers,
Ian

:flushed:

sorry for this…
You can’t test problems on listView in
https://bitbucket.org/WillNa/haxeui-bugs/src/master/, bug 2