|Re: activate cell editor in tree column [message #558875 is a reply to message #558860]
||Tue, 14 September 2010 12:59
| Pascal G
Registered: July 2009
On 10-09-14 11:57 AM, Ketan Padegaonkar wrote:|
> I think it should be possible to do it. Try whacking the code out of
> table.click() and put it somewhere. Make sure that the clickOnCell()
> test works exactly the same way :)
I had to do the same thing (I thought I added a bug report for that but
I can't seem to find it :P). What I did is extend SWTBotTreeItem and use
this handy-dandy bit of code:
public SwtBotTreeItemExtension click(final int columnIndex)
int columnCount = new SWTBotTree(parentTree).columnCount();
if (columnIndex < 0 || columnIndex > columnCount)
throw new IndexOutOfBoundsException("Index should be
between 0 and "
+ ". Passed value is: "
// Get the center point of the cell at the specified column
Point point = syncExec(new Result<Point>()
public Point run()
Rectangle bounds = widget.getBounds(columnIndex);
int x = bounds.x + (bounds.width / 2);
int y = bounds.y + (bounds.height / 2);
return new Point(x, y);
this, of course, could be integrated as part of SWTBotTreeItem API.
hope this helps.
Pascal Gélinas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/
*Because performance matters.*
Powered by FUDForum
. Page generated in 0.08727 seconds