Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Way to detect table cell clicks?
Way to detect table cell clicks? [message #1577257] Wed, 21 January 2015 20:08 Go to next message
Eclipse UserFriend
So I need to have table cells clickable/selectable. For starters it will do if I can detect a table-cell click. Is there a way to do that? I know there is the possibility of having editable columns and I guess there must be some mechanism to support cell click detection for that, I just do not see any way to hook into that (yet).

Thanks for any help
Re: Way to detect table cell clicks? [message #1578063 is a reply to message #1577257] Thu, 22 January 2015 06:56 Go to previous messageGo to next message
Eclipse UserFriend
You can add a property change listener for column changes to your table and store the column in which the cursor currently is in a member of your TableField

getTable().addPropertyChangeListener(ITable.PROP_CONTEXT_COLUMN, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
currentColumn = evt.getNewValue();
}
});

Then in the execRowClick() and/or execRowAction() method of your table field you can compare this member against the columns you want to have clickable. The combination of row (passed into the methods) and column (kept up to date using the listener) you can then determine in which cell the click happened.
Re: Way to detect table cell clicks? [message #1578524 is a reply to message #1578063] Thu, 22 January 2015 12:56 Go to previous messageGo to next message
Eclipse UserFriend
Yes, this is just what I wanted. Thanks for answering on such a short notice!
Re: Way to detect table cell clicks? [message #1585308 is a reply to message #1578524] Mon, 26 January 2015 07:33 Go to previous messageGo to next message
Eclipse UserFriend
You're welcome, I'm glad I could help.
Re: Way to detect table cell clicks? [message #1802609 is a reply to message #1585308] Tue, 12 February 2019 18:24 Go to previous message
Eclipse UserFriend
thank you Urs ... 4 years later, this thread helped me ;-)
cu
Previous Topic:Migration to Photon - wrong package stucture after cloning
Next Topic:How does Hierarchical Table work?
Goto Forum:
  


Current Time: Mon Feb 10 20:07:03 GMT 2025

Powered by FUDForum. Page generated in 0.05784 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top