2019 up to now | 2018 2017  |  2016  | 2015 | 2014 | 2013 | 2012

Mailing List - Entries of 2012

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] Check tooltip of list elements

  • Subject: Re: [QF-Test] Check tooltip of list elements
  • From: Peter Füss <peter.fuess@?.ch>
  • Date: Thu, 09 Aug 2012 11:41:35 +0200

Hello Michael,

instead of useing
listItems = component.getComponents()
try to do
listItems = component.getModel().getElementAt(idx)

You can iterate through the list-items by:

for(i in 0..<component.getModel().getSize()) {

Hope it helps

best regards

Peter Füss

Am 09.08.2012 10:38, schrieb Michael Kommer:

I checked previous posts to see if anyone already encountered this problem.

We have to check the tooltip of the elements in a JList (not the tooltip of the List itself). I tried this with a small
groovy Script.

component = rc.getComponent("theList")
listItems = component.getComponents()
[... .getToolTipText() etc. ...]

If I do so i receive the cellRenderer which holds no information of tooltips or list elements.
Also the cellRenderer has no method "getToolTipText()"

component.getToolTipText() works fine for the list tooltip. But in this case the list element tooltip is required and
not the list tooltip.
Maybe the .getComponents() method isn´t the right one to get to the list element objects but can´t see any other solutions.