Brendan, Renderers are just used to alter the way that data is painted . You could possibly use a ListViewItemEditor to achieve what you want. You would use your renderer to paint the ListView's items, but then automatically open a ListViewItemEditor when you move the mouse over the item. The editor would show the same data, in the same Components, layed out in same way as your Renderer, but the user would be able to interact with them. You have control over where the Editor is placed (so you can put it exactly on top of the correct ListView item and the user will not notice that they are seeing an Editor and not a Renderer)
https://pivot.apache.org/2.0.1/docs/api/org/apache/pivot/wtk/Renderer.html https://pivot.apache.org/2.0.1/docs/api/org/apache/pivot/wtk/ListView.ItemRenderer.html https://pivot.apache.org/2.0.1/docs/api/org/apache/pivot/wtk/content/ListViewItemEditor.html Have a look at the Table Row Editor demo to see how editors can be used. http://pivot.apache.org/demos/table-row-editor.html http://svn.apache.org/repos/asf/pivot/trunk/demos/src/org/apache/pivot/demos/roweditor/ Note that this shows a transition when the editor opens, but that does not have to happen. Also, the TableView's row editor looks different to the renderer, but you could make them the same so that the end user is unaware that they are being presented with an Editor rather than a Renderer. Another option would just be to use Container such as TablePane or BoxPane instead of a ListView. You could create a custom Component (using much of the code of your existing ListView.ItemRenderer) that you would then add into the Container to be the 'ListView items'. These will be true Component with full user interaction, and not just rendered Components like you see with your custom ListView.ItemRenderer. Of course by doing this, you wouldn't have the same data model controlling what is shown in the new 'ListView', but you could add that yourself too if needed. Chris On 18 March 2012 10:25, ccp999 <[email protected]> wrote: > Hi, > > I implemented an ListView ItemRenderer to show a group of components, like > TableView, PushButton inside the List Item. However, I couldn't get any > interaction with these items. > > Is it true that ListView can only be used to show and make selection? If > not, could you show me how to, let say, make the push button work in a > ItemRenderer? > > Thanks, > > Brendan > > -- > View this message in context: > http://apache-pivot-users.399431.n3.nabble.com/Interaction-with-ListView-s-Item-not-functioning-tp3836264p3836264.html > Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
