Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Tables
SWT Tables [message #464282] Sun, 20 November 2005 15:23 Go to next message
Jeff Yuan is currently offline Jeff YuanFriend
Messages: 34
Registered: July 2009
Member
Hi,
I have a quick question about SWT Tables. Is it possible to setup a
listener to do some behavior whenever a user clicks in a specific
cell/entry in the table?

I'm thinking of having an icon in the leftmost column of a table, and
doing some action whenever the user clicks on that icon to the specific
row it is in. Is there some listener or something for this?

Thanks.
Re: SWT Tables [message #464304 is a reply to message #464282] Mon, 21 November 2005 09:08 Go to previous message
nunofsousa is currently offline nunofsousaFriend
Messages: 5
Registered: July 2009
Junior Member
Yes it is possible.
Use a selection listener:

table.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent event)
{
SelectionAction.run();
}
});

After that make an action:

//Seleccionar uma entrada da lista
SelectionAction = new Action()
{
public void run()
{
TableItem[] item = table.getSelection();
String docid = item[0].getText(1);
int doc = Integer.parseInt(docid);

}
};
Previous Topic:Tab Navigation
Next Topic:Image Map - Swap Image with Mouse Overs
Goto Forum:
  


Current Time: Thu Mar 28 15:41:39 GMT 2024

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

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

Back to the top