Multiple selection of items in nebula grid [message #17174] |
Mon, 27 November 2006 16:11 |
Eclipse User |
|
|
|
Originally posted by: krishna.24jan.gmail.com
Hi,
Can any one suggest possible solutions to enable multiple select of
grid items in nebula grid.when i drag my mouse over the items the focus
comes over the items but only one item gets selected at a time.I want is
to select multiple items when i drag my mouse over them.
Can any one kindly suggest possible solutions for making it happen.
Thanks in advance
krishna
|
|
|
|
Re: Multiple selection of items in nebula grid [message #17882 is a reply to message #17848] |
Tue, 28 November 2006 05:09 |
Eclipse User |
|
|
|
Originally posted by: krishna_24jan.gmail.com
Hi chris,
with set cell selection enabled as true u can select cells individually.
All i want is ,when i drag my mouse over some cells all the cells must be
selected.
Currently what is happening is when i drag my mouse over the items only
the first item gets selected rest all the items just come in to focus.
suppose i select a cell and drag my mouse over 5 cells the getselectedcell
count returns only one.
My reqmt is to select multiple cells at a time and perform a single
operation on it by right clicking on it.
Please help me out in this..
Thanks in advance
krishna
|
|
|
|
Re: Multiple selection of items in nebula grid [message #17988 is a reply to message #17907] |
Wed, 29 November 2006 03:36 |
Eclipse User |
|
|
|
Originally posted by: krishna_24jan.gmail.com
The code for creating grid ::
final Grid grid =new Grid(shell,SWT.BORDER | SWT.V_SCROLL |
SWT.H_SCROLL|SWT.MULTI);
grid.setHeaderVisible(true);
grid.setRowHeaderVisible(true);
grid.setLinesVisible(false);
grid.setCellSelectionEnabled(true);
For this grid iam adding column headers and row headers too.
Now Iam adding grditems for this grid and want multiple selection of items
when i drag my mouse over them..
|
|
|
|
|
Re: Multiple selection of items in nebula grid [message #18054 is a reply to message #18014] |
Thu, 30 November 2006 04:11 |
Eclipse User |
|
|
|
Originally posted by: krishna_24jan.gmail.com
Iam using windows operating system.
addition to that code of creating grid ,i have some code for creating grid
items
and i just added one mouse listener.
grid.addMouseListener(new MouseAdapter(){
public void mouseDown(MouseEvent e){
if(e.button==1){
if(grid.getCellSelectionCount()!=0){
Point pt = grid.getCellSelection()[0];
System.out.println(+pt.x + "***");
System.out.println(pt + "&&&" + grid.getColumn(pt));
System.out.println("Well ID is -- "
+ well[pt.x][pt.y].getWellId());
the cell selection count is getting one every time when ever i drag my
mouse over the items.
are u sure ur getting cellselection count more than one every time
cause items are only coming in to focus but not getting selected.
|
|
|
|
|
Re: Multiple selection of items in nebula grid [message #18850 is a reply to message #18645] |
Fri, 01 December 2006 07:15 |
Eclipse User |
|
|
|
Originally posted by: krishna_24jan.gmail.com
My requirement is i need to select multiple cells in a drag and when i
right click on them i need to perform some action on them.
As u have suggested can u send me a sample snippet abt how handle the
selection listener as per my requirement..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06274 seconds