I am trying to develop an app in which the user has to navigate through a list of elements; so somebody suggested the optimal way would be using a HListGroup.
What i need for each row is something like this:
(Icon) Text1 Text2 Text3
Up to now, I have been able to add an icon and a text to each row; what I'd like to do is be navigate through the elements, and know which one has the focus, as there is a HStaticText which changes depending on which element is selected. But I haven't been able to navigate within the elements, it's the whole HListGroup which has the focus, and that's all.
Does anybody know how I should do this? And how do I know which item is selected? I have seen a method called listGroup.getCurrentItem(); should I combine this with some kind of listener?
Thanks a lot in advance!
Hi, trying a couple of things I finally found the way, I don't know if it's the best way or not, but it works. Now just a little question: i've seen i can choose the background color for the HlistGroup but, what i need is a transparent background for it, and a coloured background for the element which has the focus. Can this be done or am I asking too much?
Thanks once more to everyone
P.S. Just in case it might be useful, what I did was add a keylistener, and when u press up/down, it does the following:
my_counter--; // or ++