Results 1 to 2 of 2
Hi, I am new to SWT and Linux. I am have a SWT table that displays the contents of a directory. This directory contains text files. These files get displayed ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-01-2006 #1
- Join Date
- Sep 2006
SWT Table Linux
I am new to SWT and Linux. I am have a SWT table that displays the contents of a directory. This directory contains text files. These files get displayed in a table. when i click on one of the table items i would like it to open in a separate window. the problem i have is that when i click on an item in the SWT table it opens all items in separate windows instead of JUST the one i clicked.
i was trying to do a mouse listener but could not get it to work,
can anyone please help me, i am really really stuck
- 09-02-2006 #2
A MouseListener? That's majorly excessive...
Let me pop up my SWT app...
Okay. The way I have my app structured, you select an entry in the table and click a separate Button, but I assume that adding a SelectionListener to the Table will work just fine as well. The key piece of code is this here:
TableItem items = table.getSelection(); TableItem theItem = items; String chosenBoard = theItem.getText(0);
Using this process, you should be able to only pop up the single element you want.